Skip to content

Commit ddcae3e

Browse files
runRedisScript api to process integer returned by script run in the redis (#447)
Signed-off-by: vedganes <[email protected]>
1 parent 33d89c7 commit ddcae3e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

common/redisapi.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ static inline std::set<std::string> runRedisScript(RedisContext &ctx, const std:
104104
{
105105
SWSS_LOG_ERROR("Got EMPTY response type from redis %d", reply->type);
106106
}
107+
else if (reply->type == REDIS_REPLY_INTEGER)
108+
{
109+
SWSS_LOG_DEBUG("Got INTEGER response type from redis %d", reply->type);
110+
ret.emplace(std::to_string(reply->integer));
111+
}
107112
else if (reply->type != REDIS_REPLY_ARRAY)
108113
{
109114
SWSS_LOG_ERROR("Got invalid response type from redis %d", reply->type);

0 commit comments

Comments
 (0)