Do nothing if REDISMODULE_REPLYFLAG_TOPARSE is false, otherwise * use the protocol of the reply in reply->proto in order to fill the * reply with parsed data according to the reply type. */
| 3782 | * use the protocol of the reply in reply->proto in order to fill the |
| 3783 | * reply with parsed data according to the reply type. */ |
| 3784 | void moduleParseCallReply(RedisModuleCallReply *reply) { |
| 3785 | if (!(reply->flags & REDISMODULE_REPLYFLAG_TOPARSE)) return; |
| 3786 | reply->flags &= ~REDISMODULE_REPLYFLAG_TOPARSE; |
| 3787 | |
| 3788 | switch(reply->proto[0]) { |
| 3789 | case ':': moduleParseCallReply_Int(reply); break; |
| 3790 | case '$': moduleParseCallReply_BulkString(reply); break; |
| 3791 | case '-': /* handled by next item. */ |
| 3792 | case '+': moduleParseCallReply_SimpleString(reply); break; |
| 3793 | case '*': moduleParseCallReply_Array(reply); break; |
| 3794 | } |
| 3795 | } |
| 3796 | |
| 3797 | void moduleParseCallReply_Int(RedisModuleCallReply *reply) { |
| 3798 | char *proto = reply->proto; |
no test coverage detected