mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-21 19:02:06 +00:00
[mod_sofia] Properly handle nua events came without nua handles.
This commit is contained in:
parent
90c35685c3
commit
b78c9a115e
@ -2282,7 +2282,7 @@ void sofia_process_dispatch_event(sofia_dispatch_event_t **dep)
|
|||||||
profile->queued_events--;
|
profile->queued_events--;
|
||||||
switch_mutex_unlock(profile->flag_mutex);
|
switch_mutex_unlock(profile->flag_mutex);
|
||||||
|
|
||||||
nua_handle_unref(nh);
|
if (nh) nua_handle_unref(nh);
|
||||||
nua_unref(nua);
|
nua_unref(nua);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2516,7 +2516,7 @@ void sofia_event_callback(nua_event_t event,
|
|||||||
de = su_alloc(nua_handle_get_home(nh), sizeof(*de));
|
de = su_alloc(nua_handle_get_home(nh), sizeof(*de));
|
||||||
memset(de, 0, sizeof(*de));
|
memset(de, 0, sizeof(*de));
|
||||||
nua_save_event(nua, de->event);
|
nua_save_event(nua, de->event);
|
||||||
de->nh = nua_handle_ref(nh);
|
de->nh = nh ? nua_handle_ref(nh) : NULL;
|
||||||
de->data = nua_event_data(de->event);
|
de->data = nua_event_data(de->event);
|
||||||
de->sip = sip_object(de->data->e_msg);
|
de->sip = sip_object(de->data->e_msg);
|
||||||
de->profile = profile;
|
de->profile = profile;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user