Reply exactly what a Redis command returned us with RedisModule_Call(). * This function is useful when we use RedisModule_Call() in order to * execute some command, as we want to reply to the client exactly the * same reply we obtained by the command. * * The function always returns REDISMODULE_OK. */
| 1759 | * |
| 1760 | * The function always returns REDISMODULE_OK. */ |
| 1761 | int RM_ReplyWithCallReply(RedisModuleCtx *ctx, RedisModuleCallReply *reply) { |
| 1762 | client *c = moduleGetReplyClient(ctx); |
| 1763 | if (c == NULL) return REDISMODULE_OK; |
| 1764 | AeLocker locker; |
| 1765 | std::unique_lock<fastlock> lock(c->lock); |
| 1766 | locker.arm(c); |
| 1767 | sds proto = sdsnewlen(reply->proto, reply->protolen); |
| 1768 | addReplySds(c,proto); |
| 1769 | return REDISMODULE_OK; |
| 1770 | } |
| 1771 | |
| 1772 | /* Send a string reply obtained converting the double 'd' into a bulk string. |
| 1773 | * This function is basically equivalent to converting a double into |
nothing calls this directly
no test coverage detected