Skip to content

Commit

Permalink
MT#55283 Encode and restore json recording_random_tag
Browse files Browse the repository at this point in the history
closes #1786

Change-Id: Ib1a8065184caa29cb65a592049bbf8ac0d0116fd
  • Loading branch information
smititelu authored and rfuchs committed Jan 26, 2024
1 parent a0ba4d7 commit 3cd4681
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions daemon/redis.c
Original file line number Diff line number Diff line change
Expand Up @@ -2085,6 +2085,8 @@ static void json_restore_call(struct redis *r, const str *callid, bool foreign)
call_str_cpy(c, &c->recording_path, &s);
redis_hash_get_str(&s, &call, "recording_pattern");
call_str_cpy(c, &c->recording_pattern, &s);
redis_hash_get_str(&s, &call, "recording_random_tag");
call_str_cpy(c, &c->recording_random_tag, &s);
recording_start(c);
}

Expand Down Expand Up @@ -2380,6 +2382,8 @@ char* redis_encode_json(call_t *c) {
JSON_SET_SIMPLE_STR("recording_path", &c->recording_path);
if (c->recording_pattern.len)
JSON_SET_SIMPLE_STR("recording_pattern", &c->recording_pattern);
if (c->recording_random_tag.len)
JSON_SET_SIMPLE_STR("recording_random_tag", &c->recording_random_tag);
}

json_builder_end_object(builder);
Expand Down

0 comments on commit 3cd4681

Please sign in to comment.