Browse Source

TT#14008 lock Redis context during restore GET

Change-Id: I487427b4711aa9600db376f3987086fa47472bdb
pull/1346/head
Richard Fuchs 4 years ago
parent
commit
d1f320c80f
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      daemon/redis.c

+ 3
- 0
daemon/redis.c View File

@ -1812,7 +1812,10 @@ static void json_restore_call(struct redis *r, const str *callid, bool foreign)
JsonReader *root_reader =0; JsonReader *root_reader =0;
JsonParser *parser =0; JsonParser *parser =0;
mutex_lock(&r->lock);
rr_jsonStr = redis_get(r, REDIS_REPLY_STRING, "GET " PB, STR(callid)); rr_jsonStr = redis_get(r, REDIS_REPLY_STRING, "GET " PB, STR(callid));
mutex_unlock(&r->lock);
err = "could not retrieve JSON data from redis"; err = "could not retrieve JSON data from redis";
if (!rr_jsonStr) if (!rr_jsonStr)
goto err1; goto err1;


Loading…
Cancel
Save