Browse Source

MT#55283 prevent erroneous swithch to DB 0

A call that gets created but then doesn't get initialised would have its
Redis DB left at zero. At destruction it would then try to switch to DB
zero. Fix this by using an appropriate initial value.

Closes #1905

Change-Id: I852e48c5a06b732b37d2ccd5c478de4760aacd4e
pull/1907/head
Richard Fuchs 11 months ago
parent
commit
add46f265a
2 changed files with 2 additions and 1 deletions
  1. +1
    -0
      daemon/call.c
  2. +1
    -1
      include/call.h

+ 1
- 0
daemon/call.c View File

@ -4331,6 +4331,7 @@ static call_t *call_create(const str *callid) {
c->tos = rtpe_config.default_tos;
c->poller = rtpe_get_poller();
c->sdp_fragments = fragments_ht_new();
c->redis_hosted_db = -1;
if (rtpe_config.cpu_affinity)
c->cpu_affinity = call_socket_cpu_affinity++ % rtpe_config.cpu_affinity;
else


+ 1
- 1
include/call.h View File

@ -766,7 +766,7 @@ struct call {
sockaddr_t xmlrpc_callback;
endpoint_t dtmf_log_dest;
unsigned int redis_hosted_db;
int redis_hosted_db;
atomic64 last_redis_update;
struct recording *recording;


Loading…
Cancel
Save