mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 12:40:17 +00:00
mod_callcenter: Fix a potential segv following previous commit
This commit is contained in:
parent
8bd3513461
commit
f288e3c38d
@ -1275,6 +1275,9 @@ static switch_status_t load_config(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!globals.dbname) {
|
||||||
|
globals.dbname = strdup(CC_SQLITE_DB_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
/* Loading queue into memory struct */
|
/* Loading queue into memory struct */
|
||||||
if ((x_queues = switch_xml_child(cfg, "queues"))) {
|
if ((x_queues = switch_xml_child(cfg, "queues"))) {
|
||||||
@ -2683,8 +2686,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_callcenter_load)
|
|||||||
memset(&globals, 0, sizeof(globals));
|
memset(&globals, 0, sizeof(globals));
|
||||||
globals.pool = pool;
|
globals.pool = pool;
|
||||||
|
|
||||||
globals.dbname = CC_SQLITE_DB_NAME;
|
|
||||||
|
|
||||||
switch_core_hash_init(&globals.queue_hash, globals.pool);
|
switch_core_hash_init(&globals.queue_hash, globals.pool);
|
||||||
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, globals.pool);
|
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, globals.pool);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user