Lines Matching refs:context

80 static redisContext *context;  variable
271 redisReply *reply = redisCommand(context, "COMMAND"); in cliIntegrateHelp()
483 reply = redisCommand(context,"AUTH %s",config.auth); in cliAuth()
496 reply = redisCommand(context,"SELECT %d",config.dbnum); in cliSelect()
509 if (context == NULL || force) { in cliConnect()
510 if (context != NULL) { in cliConnect()
511 redisFree(context); in cliConnect()
515 context = redisConnect(config.hostip,config.hostport); in cliConnect()
517 context = redisConnectUnix(config.hostsocket); in cliConnect()
520 if (context->err) { in cliConnect()
523 fprintf(stderr,"%s:%d: %s\n",config.hostip,config.hostport,context->errstr); in cliConnect()
525 fprintf(stderr,"%s: %s\n",config.hostsocket,context->errstr); in cliConnect()
526 redisFree(context); in cliConnect()
527 context = NULL; in cliConnect()
535 anetKeepAlive(NULL, context->fd, REDIS_CLI_KEEPALIVE_INTERVAL); in cliConnect()
547 if (context == NULL) return; in cliPrintContextError()
548 fprintf(stderr,"Error: %s\n",context->errstr); in cliPrintContextError()
756 if (redisGetReply(context,&_reply) != REDIS_OK) { in cliReadReply()
758 redisFree(context); in cliReadReply()
759 context = NULL; in cliReadReply()
764 if (context->err == REDIS_ERR_IO && in cliReadReply()
767 if (context->err == REDIS_ERR_EOF) in cliReadReply()
841 if (context == NULL) return REDIS_ERR; in cliSendCommand()
892 redisAppendCommandArgv(context,argc,(const char**)argv,argvlen); in cliSendCommand()
964 context = c; in reconnectingRedisCommand()
1286 while((line = linenoise(context ? config.prompt : "not connected> ")) != NULL) { in repl()
1412 redisReply *reply = redisCommand(context, in evalMode()
1472 if (!context) exit(1); in latencyMode()
1475 reply = reconnectingRedisCommand(context,"PING"); in latencyMode()
1615 if (!context) exit(1); in latencyDistMode()
1618 reply = reconnectingRedisCommand(context,"PING"); in latencyDistMode()
1687 int fd = context->fd; in slaveMode()
1721 int s = context->fd; in getRDB()
1769 int fd = context->fd; in pipeMode()
1935 redisReply *reply = redisCommand(context, "SCAN %llu", *it); in sendScan()
1966 reply = redisCommand(context, "DBSIZE"); in getDbSize()
2005 redisAppendCommand(context, "TYPE %s", keys->element[i]->str); in getKeyTypes()
2010 if(redisGetReply(context, (void**)&reply)!=REDIS_OK) { in getKeyTypes()
2012 keys->element[i]->str, context->err, context->errstr); in getKeyTypes()
2038 redisAppendCommand(context, "%s %s", sizecmds[types[i]], in getKeySizes()
2051 if(redisGetReply(context, (void**)&reply)!=REDIS_OK) { in getKeySizes()
2053 keys->element[i]->str, context->err, context->errstr); in getKeySizes()
2271 reply = reconnectingRedisCommand(context,"INFO"); in statMode()
2358 reply = redisCommand(context,"SCAN %llu MATCH %s", in scanMode()
2361 reply = redisCommand(context,"SCAN %llu",cur); in scanMode()
2428 redisAppendCommand(context, "SET %s val",key); in LRUTestMode()
2431 redisGetReply(context, (void**)&reply); in LRUTestMode()
2436 redisAppendCommand(context, "GET %s",key); in LRUTestMode()
2439 if (redisGetReply(context, (void**)&reply) == REDIS_OK) { in LRUTestMode()
2454 if (context->err) { in LRUTestMode()