From fdabc9b59ef526f7be1046f1d7f7bf1c7a58eab0 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 23 Jan 2025 08:51:06 -0400 Subject: [PATCH] MT#55283 restore selected DB after delete Deleting a call can have the side effect of changing the active Redis DB on the writing instance. Restore the correct DB afterwards if needed. Fixes #1905 Change-Id: I12dae767ffa5d25703e024d2ec59aa21ba9da101 --- daemon/redis.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daemon/redis.c b/daemon/redis.c index cae51fb59..d7de037b2 100644 --- a/daemon/redis.c +++ b/daemon/redis.c @@ -2229,6 +2229,8 @@ err1: redis_ports_release_pop(false); must_release_pop = false; + redis_select_db(rtpe_redis_write, rtpe_redis_write->db); + mutex_lock(&rtpe_redis_write->lock); redisCommandNR(rtpe_redis_write->ctx, "DEL " PB, PBSTR(callid)); mutex_unlock(&rtpe_redis_write->lock);