Lines Matching refs:reply

271     redisReply *reply = redisCommand(context, "COMMAND");  in cliIntegrateHelp()  local
272 if(reply == NULL || reply->type != REDIS_REPLY_ARRAY) return; in cliIntegrateHelp()
276 for (size_t j = 0; j < reply->elements; j++) { in cliIntegrateHelp()
277 redisReply *entry = reply->element[j]; in cliIntegrateHelp()
315 freeReplyObject(reply); in cliIntegrateHelp()
480 redisReply *reply; in cliAuth() local
483 reply = redisCommand(context,"AUTH %s",config.auth); in cliAuth()
484 if (reply != NULL) { in cliAuth()
485 freeReplyObject(reply); in cliAuth()
493 redisReply *reply; in cliSelect() local
496 reply = redisCommand(context,"SELECT %d",config.dbnum); in cliSelect()
497 if (reply != NULL) { in cliSelect()
499 if (reply->type == REDIS_REPLY_ERROR) result = REDIS_ERR; in cliSelect()
500 freeReplyObject(reply); in cliSelect()
752 redisReply *reply; in cliReadReply() local
775 reply = (redisReply*)_reply; in cliReadReply()
777 config.last_cmd_type = reply->type; in cliReadReply()
781 if (config.cluster_mode && reply->type == REDIS_REPLY_ERROR && in cliReadReply()
782 (!strncmp(reply->str,"MOVED",5) || !strcmp(reply->str,"ASK"))) in cliReadReply()
784 char *p = reply->str, *s; in cliReadReply()
811 out = cliFormatReplyRaw(reply); in cliReadReply()
814 out = cliFormatReplyRaw(reply); in cliReadReply()
817 out = cliFormatReplyTTY(reply,""); in cliReadReply()
819 out = cliFormatReplyCSV(reply); in cliReadReply()
826 freeReplyObject(reply); in cliReadReply()
936 redisReply *reply = NULL; in reconnectingRedisCommand() local
941 while(reply == NULL) { in reconnectingRedisCommand()
953 reply = redisvCommand(c,fmt,ap); in reconnectingRedisCommand()
965 return reply; in reconnectingRedisCommand()
1412 redisReply *reply = redisCommand(context, in evalMode() local
1415 if (reply) freeReplyObject(reply); in evalMode()
1464 redisReply *reply; in latencyMode() local
1475 reply = reconnectingRedisCommand(context,"PING"); in latencyMode()
1476 if (reply == NULL) { in latencyMode()
1481 freeReplyObject(reply); in latencyMode()
1570 redisReply *reply; in latencyDistMode() local
1618 reply = reconnectingRedisCommand(context,"PING"); in latencyDistMode()
1619 if (reply == NULL) { in latencyDistMode()
1624 freeReplyObject(reply); in latencyDistMode()
1774 redisReply *reply; in pipeMode() local
1817 if (redisReaderGetReply(reader,(void**)&reply) == REDIS_ERR) { in pipeMode()
1821 if (reply) { in pipeMode()
1822 if (reply->type == REDIS_REPLY_ERROR) { in pipeMode()
1823 fprintf(stderr,"%s\n", reply->str); in pipeMode()
1825 } else if (eof && reply->type == REDIS_REPLY_STRING && in pipeMode()
1826 reply->len == 20) { in pipeMode()
1830 if (memcmp(reply->str,magic,20) == 0) { in pipeMode()
1837 freeReplyObject(reply); in pipeMode()
1839 } while(reply); in pipeMode()
1935 redisReply *reply = redisCommand(context, "SCAN %llu", *it); in sendScan() local
1938 if(reply == NULL) { in sendScan()
1941 } else if(reply->type == REDIS_REPLY_ERROR) { in sendScan()
1942 fprintf(stderr, "SCAN error: %s\n", reply->str); in sendScan()
1944 } else if(reply->type != REDIS_REPLY_ARRAY) { in sendScan()
1947 } else if(reply->elements != 2) { in sendScan()
1953 assert(reply->element[0]->type == REDIS_REPLY_STRING); in sendScan()
1954 assert(reply->element[1]->type == REDIS_REPLY_ARRAY); in sendScan()
1957 *it = strtoull(reply->element[0]->str, NULL, 10); in sendScan()
1959 return reply; in sendScan()
1963 redisReply *reply; in getDbSize() local
1966 reply = redisCommand(context, "DBSIZE"); in getDbSize()
1968 if(reply == NULL || reply->type != REDIS_REPLY_INTEGER) { in getDbSize()
1974 size = reply->integer; in getDbSize()
1975 freeReplyObject(reply); in getDbSize()
2000 redisReply *reply; in getKeyTypes() local
2010 if(redisGetReply(context, (void**)&reply)!=REDIS_OK) { in getKeyTypes()
2014 } else if(reply->type != REDIS_REPLY_STATUS) { in getKeyTypes()
2016 reply->type, keys->element[i]->str); in getKeyTypes()
2020 types[i] = toIntType(keys->element[i]->str, reply->str); in getKeyTypes()
2021 freeReplyObject(reply); in getKeyTypes()
2028 redisReply *reply; in getKeySizes() local
2051 if(redisGetReply(context, (void**)&reply)!=REDIS_OK) { in getKeySizes()
2055 } else if(reply->type != REDIS_REPLY_INTEGER) { in getKeySizes()
2063 sizes[i] = reply->integer; in getKeySizes()
2066 freeReplyObject(reply); in getKeySizes()
2076 redisReply *reply, *keys; in findBigKeys() local
2104 reply = sendScan(&it); in findBigKeys()
2105 keys = reply->element[1]; in findBigKeys()
2162 freeReplyObject(reply); in findBigKeys()
2263 redisReply *reply; in statMode() local
2271 reply = reconnectingRedisCommand(context,"INFO"); in statMode()
2272 if (reply->type == REDIS_REPLY_ERROR) { in statMode()
2273 printf("ERROR: %s\n", reply->str); in statMode()
2289 k = getLongInfoField(reply->str,buf); in statMode()
2297 aux = getLongInfoField(reply->str,"used_memory"); in statMode()
2302 aux = getLongInfoField(reply->str,"connected_clients"); in statMode()
2307 aux = getLongInfoField(reply->str,"blocked_clients"); in statMode()
2312 aux = getLongInfoField(reply->str,"total_commands_processed"); in statMode()
2318 aux = getLongInfoField(reply->str,"total_connections_received"); in statMode()
2323 aux = getLongInfoField(reply->str,"bgsave_in_progress"); in statMode()
2324 aux |= getLongInfoField(reply->str,"aof_rewrite_in_progress") << 1; in statMode()
2325 aux |= getLongInfoField(reply->str,"loading") << 2; in statMode()
2343 freeReplyObject(reply); in statMode()
2353 redisReply *reply; in scanMode() local
2358 reply = redisCommand(context,"SCAN %llu MATCH %s", in scanMode()
2361 reply = redisCommand(context,"SCAN %llu",cur); in scanMode()
2362 if (reply == NULL) { in scanMode()
2365 } else if (reply->type == REDIS_REPLY_ERROR) { in scanMode()
2366 printf("ERROR: %s\n", reply->str); in scanMode()
2371 cur = strtoull(reply->element[0]->str,NULL,10); in scanMode()
2372 for (j = 0; j < reply->element[1]->elements; j++) in scanMode()
2373 printf("%s\n", reply->element[1]->element[j]->str); in scanMode()
2375 freeReplyObject(reply); in scanMode()
2412 redisReply *reply; in LRUTestMode() local
2431 redisGetReply(context, (void**)&reply); in LRUTestMode()
2439 if (redisGetReply(context, (void**)&reply) == REDIS_OK) { in LRUTestMode()
2440 switch(reply->type) { in LRUTestMode()
2442 printf("%s\n", reply->str); in LRUTestMode()