エラーはどういう意味ですか?redisコマンドから取得した値を返す必要があります。
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;
}
これは、デバッガーを使用してゆっくりとステップ実行した場合でも発生します(ブロックアクションは長い間終了していると思われます)。Redis固有のエラー文字列は空です。reply->strには必要な正しい文字列があります。