Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6851671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:16:36+00:00 2026-05-27T01:16:36+00:00

What does the error mean? I just need to return the value I get

  • 0

What does the error mean? I just need to return the value I get from the redis command.

int getReply(char* result)
{
   redisContext *c;
   redisReply *reply;

   c = redisConnect((char*)"127.0.0.2", 6379);
   reply = redisCommand(c,"GET %s", "somekey");
   if (reply->str != NULL)
   {
       result = strdup(reply->str); 
       strerror(errno); // <-------- 'Operation now in progress'. result = null
   }

   freeReplyObject(reply);

   reply = redisCommand(c, "QUIT");
   printf("Disconnecting redis: %s\n", reply->str);

   freeReplyObject(reply);

   return 0;  
}

This happens even if I slowly step through it with the debugger (one would assume that any blocking action has long finished then). Redis specific error strings are empty, reply->str has the correct string that I want.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T01:16:36+00:00Added an answer on May 27, 2026 at 1:16 am

    Okay for everyone following up on this: This is my bad, I need to pass in the address of a pointer, otherwise it will just pass in the value. So do it like this:

    int getReply(char** result)
    {
      *result = "yes";
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What does the following error mean? Geeneration of designer file failed: Exception from HRESULT:
All are from this post . What does these statement mean: error(nargchk(5, 6, nargin));
What does the "bus error" message mean, and how does it differ from a
What does the following error message mean? cannot override a concrete member without a
What does this mean and why am I getting this error. Any suggestions on
I am unsure how to get the value of dc:creator from an RSS-feed using
What does this error mean?, I keep getting this error, it use to work
What does this error mean? Format of the initialization string does not conform to
Why does the following code give me an error (g++ 4.1.2)? template<class A> class
<td align=left valign=top> Generates no validation errors, does it mean both are valid?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.