Home
last modified time | relevance | path

Searched refs:reply (Results 1 – 25 of 29) sorted by relevance

12

/redis-3.2.3/deps/hiredis/examples/
H A Dexample.c10 redisReply *reply; in main() local
27 reply = redisCommand(c,"PING"); in main()
29 freeReplyObject(reply); in main()
34 freeReplyObject(reply); in main()
39 freeReplyObject(reply); in main()
44 freeReplyObject(reply); in main()
48 freeReplyObject(reply); in main()
52 freeReplyObject(reply); in main()
56 freeReplyObject(reply); in main()
62 freeReplyObject(reply); in main()
[all …]
H A Dexample-libev.c11 redisReply *reply = r; in getCallback() local
12 if (reply == NULL) return; in getCallback()
13 printf("argv[%s]: %s\n", (char*)privdata, reply->str); in getCallback()
H A Dexample-libevent.c11 redisReply *reply = r; in getCallback() local
12 if (reply == NULL) return; in getCallback()
13 printf("argv[%s]: %s\n", (char*)privdata, reply->str); in getCallback()
H A Dexample-libuv.c11 redisReply *reply = r; in getCallback() local
12 if (reply == NULL) return; in getCallback()
13 printf("argv[%s]: %s\n", (char*)privdata, reply->str); in getCallback()
H A Dexample-ae.c14 redisReply *reply = r; in getCallback() local
15 if (reply == NULL) return; in getCallback()
16 printf("argv[%s]: %s\n", (char*)privdata, reply->str); in getCallback()
/redis-3.2.3/deps/hiredis/
H A Dtest.c47 redisReply *reply; in select_database() local
51 assert(reply != NULL); in select_database()
56 assert(reply != NULL); in select_database()
57 if (reply->type == REDIS_REPLY_INTEGER && reply->integer == 0) { in select_database()
69 redisReply *reply; in disconnect() local
73 assert(reply != NULL); in disconnect()
222 redisReply *reply; in test_append_formatted_commands() local
244 void *reply; in test_reply_reader() local
348 redisReply *reply; in test_blocking_connection() local
391 test_cond(reply->type == REDIS_REPLY_INTEGER && reply->integer == 1) in test_blocking_connection()
[all …]
H A DREADME.md107 * A bulk (string) reply. The value of the reply can be accessed using `reply->str`.
111 * A multi bulk reply. The number of elements in the multi bulk reply is stored in
112 `reply->elements`. Every element in the multi bulk reply is a `redisReply` object as well
184 redisReply *reply;
187 redisGetReply(context,&reply); // reply for SET
188 freeReplyObject(reply);
189 redisGetReply(context,&reply); // reply for GET
190 freeReplyObject(reply);
195 freeReplyObject(reply);
198 freeReplyObject(reply);
[all …]
H A Dasync.c258 cb->fn(ac,reply,cb->privdata); in __redisRunCallback()
363 if (reply->type == REDIS_REPLY_ARRAY) { in __redisGetSubscribeCallback()
364 assert(reply->elements >= 2); in __redisGetSubscribeCallback()
366 stype = reply->element[0]->str; in __redisGetSubscribeCallback()
376 sname = sdsnewlen(reply->element[1]->str,reply->element[1]->len); in __redisGetSubscribeCallback()
403 void *reply = NULL; in redisProcessCallbacks() local
407 if (reply == NULL) { in redisProcessCallbacks()
446 c->reader->fn->freeObject(reply); in redisProcessCallbacks()
457 __redisRunCallback(ac,&cb,reply); in redisProcessCallbacks()
458 c->reader->fn->freeObject(reply); in redisProcessCallbacks()
[all …]
H A Dhiredis.h136 void *reply; /* Temporary reply pointer */ member
146 int redisReaderGetReply(redisReader *r, void **reply);
154 #define redisReplyReaderGetObject(_r) (((redisReader*)(_r))->reply)
158 void freeReplyObject(void *reply);
194 int redisGetReply(redisContext *c, void **reply);
195 int redisGetReplyFromReader(redisContext *c, void **reply);
H A DCHANGELOG.md3 * Increase the maximum multi-bulk reply depth to 7.
14 * Issue #45: Fix potential memory leak for a multi bulk reply with 0 elements
15 being created by the default reply object functions.
18 reply after the connection has been made (this happens when the maximum
H A Dhiredis.c73 redisReply *r = reply; in freeReplyObject()
191 r->reply = NULL; in __redisReaderSetError()
619 if (reply != NULL) in redisReaderGetReply()
620 *reply = NULL; in redisReaderGetReply()
661 *reply = r->reply; in redisReaderGetReply()
662 r->reply = NULL; in redisReaderGetReply()
1236 if (reply != NULL) *reply = aux; in redisGetReply()
1329 void *reply; in __redisBlockForReply() local
1334 return reply; in __redisBlockForReply()
1347 void *reply = NULL; in redisCommand() local
[all …]
/redis-3.2.3/src/
H A Dredis-cli.c272 if(reply == NULL || reply->type != REDIS_REPLY_ARRAY) return; in cliIntegrateHelp()
480 redisReply *reply; in cliAuth() local
493 redisReply *reply; in cliSelect() local
752 redisReply *reply; in cliReadReply() local
782 (!strncmp(reply->str,"MOVED",5) || !strcmp(reply->str,"ASK"))) in cliReadReply()
965 return reply; in reconnectingRedisCommand()
1415 if (reply) freeReplyObject(reply); in evalMode()
1464 redisReply *reply; in latencyMode() local
1570 redisReply *reply; in latencyDistMode() local
1959 return reply; in sendScan()
[all …]
H A Dscripting.c144 string2ll(reply+1,p-reply-1,&value); in redisProtocolToLuaType_Int()
153 string2ll(reply+1,p-reply-1,&bulklen); in redisProtocolToLuaType_Bulk()
168 lua_pushlstring(lua,reply+1,p-reply-1); in redisProtocolToLuaType_Status()
178 lua_pushlstring(lua,reply+1,p-reply-1); in redisProtocolToLuaType_Error()
188 string2ll(reply+1,p-reply-1,&mbulklen); in redisProtocolToLuaType_MultiBulk()
586 (reply[0] == '*' && reply[1] != '-')) { in luaRedisGenericCommand()
589 if (reply != c->buf) sdsfree(reply); in luaRedisGenericCommand()
1979 *o = sdscatlen(*o,reply+1,p-reply-1); in ldbRedisProtocolToHuman_Int()
1987 string2ll(reply+1,p-reply-1,&bulklen); in ldbRedisProtocolToHuman_Bulk()
2000 *o = sdscatrepr(*o,reply,p-reply); in ldbRedisProtocolToHuman_Status()
[all …]
H A Dnetworking.c110 c->reply = listCreate(); in createClient()
199 ln = listLast(reply); in dupLastObjectIfNeeded()
235 if (listLength(c->reply) == 0) { in _addReplyObjectToList()
237 listAddNodeTail(c->reply,o); in _addReplyObjectToList()
438 return listLast(c->reply); in addDeferredMultiBulkLength()
602 listRelease(dst->reply); in copyClientOutputBuffer()
603 dst->reply = listDup(src->reply); in copyClientOutputBuffer()
831 listRelease(c->reply); in freeClient()
927 listDelNode(c->reply,listFirst(c->reply)); in writeToClient()
939 listDelNode(c->reply,listFirst(c->reply)); in writeToClient()
[all …]
H A Dreplication.c1283 sds reply; in slaveTryPartialResynchronization() local
1306 if (reply != NULL) { in slaveTryPartialResynchronization()
1308 sdsfree(reply); in slaveTryPartialResynchronization()
1317 if (sdslen(reply) == 0) { in slaveTryPartialResynchronization()
1320 sdsfree(reply); in slaveTryPartialResynchronization()
1331 runid = strchr(reply,' '); in slaveTryPartialResynchronization()
1355 sdsfree(reply); in slaveTryPartialResynchronization()
1359 if (!strncmp(reply,"+CONTINUE",9)) { in slaveTryPartialResynchronization()
1363 sdsfree(reply); in slaveTryPartialResynchronization()
1372 if (strncmp(reply,"-ERR",4)) { in slaveTryPartialResynchronization()
[all …]
H A Dredis-benchmark.c191 void *reply = NULL; in readHandler() local
206 if (redisGetReply(c->context,&reply) != REDIS_OK) { in readHandler()
210 if (reply != NULL) { in readHandler()
211 if (reply == (void*)REDIS_REPLY_ERROR) { in readHandler()
219 redisReply *r = reply; in readHandler()
226 freeReplyObject(reply); in readHandler()
H A Dsentinel.c2245 if (!reply || !link) return; in sentinelInfoReplyCallback()
2247 r = reply; in sentinelInfoReplyCallback()
2257 UNUSED(reply); in sentinelDiscardReplyCallback()
2268 if (!reply || !link) return; in sentinelPingReplyCallback()
2270 r = reply; in sentinelPingReplyCallback()
2307 if (!reply || !link) return; in sentinelPublishReplyCallback()
2309 r = reply; in sentinelPublishReplyCallback()
2431 if (!reply || !ri) return; in sentinelReceiveHelloMessages()
2432 r = reply; in sentinelReceiveHelloMessages()
3513 if (!reply || !link) return; in sentinelReceiveIsMasterDownReply()
[all …]
H A Daof.c583 c->reply = listCreate(); in createFakeClient()
588 listSetFreeMethod(c->reply,decrRefCountVoid); in createFakeClient()
589 listSetDupMethod(c->reply,dupClientReplyValue); in createFakeClient()
604 listRelease(c->reply); in freeFakeClient()
702 serverAssert(fakeClient->bufpos == 0 && listLength(fakeClient->reply) == 0); in loadAppendOnlyFile()
H A Ddb.c141 robj *lookupKeyReadOrReply(client *c, robj *key, robj *reply) { in lookupKeyReadOrReply() argument
143 if (!o) addReply(c,reply); in lookupKeyReadOrReply()
147 robj *lookupKeyWriteOrReply(client *c, robj *key, robj *reply) { in lookupKeyWriteOrReply() argument
149 if (!o) addReply(c,reply); in lookupKeyWriteOrReply()
H A Dobject.c701 robj *objectCommandLookupOrReply(client *c, robj *key, robj *reply) { in objectCommandLookupOrReply() argument
704 if (!o) addReply(c, reply); in objectCommandLookupOrReply()
/redis-3.2.3/tests/unit/
H A Dobuf-limits.tcl7 set reply [$rd1 read]
8 assert {$reply eq "subscribe foo 1"}
27 set reply [$rd1 read]
28 assert {$reply eq "subscribe foo 1"}
53 set reply [$rd1 read]
54 assert {$reply eq "subscribe foo 1"}
H A Dscripting.tcl22 test {EVAL - Lua status code reply -> Redis protocol type conversion} {
26 test {EVAL - Lua error reply -> Redis protocol type conversion} {
91 test {EVAL - Redis status reply -> Lua type conversion} {
98 test {EVAL - Redis error reply -> Lua type conversion} {
106 test {EVAL - Redis nil bulk reply -> Lua type conversion} {
/redis-3.2.3/tests/support/
H A Dredis.tcl221 set ::redis::state($id) [dict create buf {} mbulk -1 bulk -1 reply {}]
225 proc ::redis::redis_call_callback {id type reply} { argument
244 + {redis_call_callback $id reply [string range $line 1 end-1]}
260 redis_call_callback $id reply {}
279 redis_call_callback $id reply \
283 lappend reply [string range $buf 0 end-2]
288 redis_call_callback $id reply \
289 [dict get $::redis::state($id) reply]
H A Dserver.tcl99 set reply [gets $fd]
100 if {[string range $reply 0 0] eq {+} ||
101 [string range $reply 0 0] eq {-}} {
/redis-3.2.3/tests/sentinel/tests/
H A D05-manual.tcl9 catch {S 0 SENTINEL FAILOVER mymaster} reply
10 assert {$reply eq "OK"}

12