Add the SDS 's' string to the client output buffer, as a side effect * the SDS string is freed. */
| 462 | /* Add the SDS 's' string to the client output buffer, as a side effect |
| 463 | * the SDS string is freed. */ |
| 464 | void addReplySds(client *c, sds s) { |
| 465 | if (prepareClientToWrite(c) != C_OK) { |
| 466 | /* The caller expects the sds to be free'd. */ |
| 467 | sdsfree(s); |
| 468 | return; |
| 469 | } |
| 470 | if (_addReplyToBuffer(c,s,sdslen(s)) != C_OK) |
| 471 | _addReplyProtoToList(c,s,sdslen(s)); |
| 472 | sdsfree(s); |
| 473 | } |
| 474 | |
| 475 | /* This low level function just adds whatever protocol you send it to the |
| 476 | * client buffer, trying the static buffer initially, and using the string |
no test coverage detected