mod_callcenter: Fix a potential segv following previous commit

This commit is contained in:
Marc Olivier Chouinard 2010-10-01 23:35:51 -04:00
parent 8bd3513461
commit f288e3c38d
1 changed files with 3 additions and 2 deletions

View File

@ -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 */
if ((x_queues = switch_xml_child(cfg, "queues"))) {
@ -2683,8 +2686,6 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_callcenter_load)
memset(&globals, 0, sizeof(globals));
globals.pool = pool;
globals.dbname = CC_SQLITE_DB_NAME;
switch_core_hash_init(&globals.queue_hash, globals.pool);
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, globals.pool);