MCPcopy Create free account
hub / github.com/F-Stack/f-stack / setDeferredAggregateLen

Function setDeferredAggregateLen

app/redis-6.2.6/src/networking.c:633–643  ·  view source on GitHub ↗

Populate the length object and try gluing it to the next chunk. */

Source from the content-addressed store, hash-verified

631
632/* Populate the length object and try gluing it to the next chunk. */
633void setDeferredAggregateLen(client *c, void *node, long length, char prefix) {
634 serverAssert(length >= 0);
635
636 /* Abort when *node is NULL: when the client should not accept writes
637 * we return NULL in addReplyDeferredLen() */
638 if (node == NULL) return;
639
640 char lenstr[128];
641 size_t lenstr_len = sprintf(lenstr, "%c%ld\r\n", prefix, length);
642 setDeferredReply(c, node, lenstr, lenstr_len);
643}
644
645void setDeferredArrayLen(client *c, void *node, long length) {
646 setDeferredAggregateLen(c,node,length,'*');

Callers 5

setDeferredArrayLenFunction · 0.85
setDeferredMapLenFunction · 0.85
setDeferredSetLenFunction · 0.85
setDeferredAttributeLenFunction · 0.85
setDeferredPushLenFunction · 0.85

Calls 2

sprintfFunction · 0.85
setDeferredReplyFunction · 0.85

Tested by

no test coverage detected