mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-15 16:39:14 +00:00
FS-11038: [mod_sofia] fix crash in gwlist api command
This commit is contained in:
parent
76795ac2e2
commit
b496635a8c
@ -1693,7 +1693,6 @@ void sofia_glue_del_every_gateway(sofia_profile_t *profile)
|
|||||||
void sofia_glue_gateway_list(sofia_profile_t *profile, switch_stream_handle_t *stream, int up)
|
void sofia_glue_gateway_list(sofia_profile_t *profile, switch_stream_handle_t *stream, int up)
|
||||||
{
|
{
|
||||||
sofia_gateway_t *gp = NULL;
|
sofia_gateway_t *gp = NULL;
|
||||||
char *r = (char *) stream->data;
|
|
||||||
|
|
||||||
switch_mutex_lock(mod_sofia_globals.hash_mutex);
|
switch_mutex_lock(mod_sofia_globals.hash_mutex);
|
||||||
for (gp = profile->gateways; gp; gp = gp->next) {
|
for (gp = profile->gateways; gp; gp = gp->next) {
|
||||||
@ -1704,10 +1703,6 @@ void sofia_glue_gateway_list(sofia_profile_t *profile, switch_stream_handle_t *s
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r) {
|
|
||||||
end_of(r) = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
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