mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-04 12:21:54 +00:00
fix profile reload issue
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6186 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
6528728611
commit
e4e4f007c5
@ -1663,16 +1663,19 @@ void sofia_glue_del_profile(sofia_profile_t *profile)
|
|||||||
switch_hash_index_t *hi;
|
switch_hash_index_t *hi;
|
||||||
const void *var;
|
const void *var;
|
||||||
void *val;
|
void *val;
|
||||||
|
sofia_profile_t *pptr;
|
||||||
|
|
||||||
switch_mutex_lock(mod_sofia_globals.hash_mutex);
|
switch_mutex_lock(mod_sofia_globals.hash_mutex);
|
||||||
|
|
||||||
for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||||
switch_hash_this(hi, &var, NULL, &val);
|
switch_hash_this(hi, &var, NULL, &val);
|
||||||
|
if ((pptr = (sofia_profile_t *) val) && pptr == profile) {
|
||||||
aliases[i++] = strdup((char *) var);
|
aliases[i++] = strdup((char *) var);
|
||||||
if (i == 512) {
|
if (i == 512) {
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (j = 0; j < i && j < 512; j++) {
|
for (j = 0; j < i && j < 512; j++) {
|
||||||
switch_core_hash_delete(mod_sofia_globals.profile_hash, aliases[j]);
|
switch_core_hash_delete(mod_sofia_globals.profile_hash, aliases[j]);
|
||||||
@ -1681,6 +1684,8 @@ void sofia_glue_del_profile(sofia_profile_t *profile)
|
|||||||
|
|
||||||
for (gp = profile->gateways; gp; gp = gp->next) {
|
for (gp = profile->gateways; gp; gp = gp->next) {
|
||||||
switch_core_hash_delete(mod_sofia_globals.gateway_hash, gp->name);
|
switch_core_hash_delete(mod_sofia_globals.gateway_hash, gp->name);
|
||||||
|
switch_core_hash_delete(mod_sofia_globals.gateway_hash, gp->register_from);
|
||||||
|
switch_core_hash_delete(mod_sofia_globals.gateway_hash, gp->register_contact);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_mutex_unlock(mod_sofia_globals.hash_mutex);
|
switch_mutex_unlock(mod_sofia_globals.hash_mutex);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user