Adds an empty object to the reply list that will contain the multi bulk * length, which is not known when this function is called. */
| 562 | /* Adds an empty object to the reply list that will contain the multi bulk |
| 563 | * length, which is not known when this function is called. */ |
| 564 | void *addReplyDeferredLen(client *c) { |
| 565 | /* Note that we install the write event here even if the object is not |
| 566 | * ready to be sent, since we are sure that before returning to the |
| 567 | * event loop setDeferredAggregateLen() will be called. */ |
| 568 | if (prepareClientToWrite(c) != C_OK) return NULL; |
| 569 | trimReplyUnusedTailSpace(c); |
| 570 | listAddNodeTail(c->reply,NULL); /* NULL is our placeholder. */ |
| 571 | return listLast(c->reply); |
| 572 | } |
| 573 | |
| 574 | void setDeferredReply(client *c, void *node, const char *s, size_t length) { |
| 575 | listNode *ln = (listNode*)node; |
no test coverage detected