Add the SDS 's' string to the client output buffer, as a side effect * the SDS string is freed. */
| 374 | /* Add the SDS 's' string to the client output buffer, as a side effect |
| 375 | * the SDS string is freed. */ |
| 376 | void addReplySds(client *c, sds s) { |
| 377 | if (prepareClientToWrite(c) != C_OK) { |
| 378 | /* The caller expects the sds to be free'd. */ |
| 379 | sdsfree(s); |
| 380 | return; |
| 381 | } |
| 382 | if (_addReplyToBuffer(c,s,sdslen(s)) != C_OK) |
| 383 | _addReplyProtoToList(c,s,sdslen(s)); |
| 384 | sdsfree(s); |
| 385 | } |
| 386 | |
| 387 | /* This low level function just adds whatever protocol you send it to the |
| 388 | * client buffer, trying the static buffer initially, and using the string |
no test coverage detected