From 7adab49c698d7f6d31b22a8afa74bbac0ca74cdf Mon Sep 17 00:00:00 2001 From: Benny Prijono Date: Tue, 20 Feb 2007 18:47:12 +0000 Subject: Fixed (and tested) ticket #111: Workaround for forking git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/pjproject-0.5-stable@988 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/src/pjsip/sip_ua_layer.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'pjsip') diff --git a/pjsip/src/pjsip/sip_ua_layer.c b/pjsip/src/pjsip/sip_ua_layer.c index 12308f12..56000035 100644 --- a/pjsip/src/pjsip/sip_ua_layer.c +++ b/pjsip/src/pjsip/sip_ua_layer.c @@ -805,24 +805,17 @@ retry_on_deadlock: /* Report to application about forked condition. * Application can either create a dialog or ignore the response. */ - if (mod_ua.param.on_dlg_forked) + if (mod_ua.param.on_dlg_forked) { dlg = (*mod_ua.param.on_dlg_forked)(dlg_set->dlg_list.next, rdata); - else - dlg = NULL; - - /* Ignore this response if application doesn't want to - * create a dialog. - */ - if (dlg == NULL) { - pj_mutex_unlock(mod_ua.mutex); + } else { + dlg = dlg_set->dlg_list.next; PJ_LOG(4,(THIS_FILE, - "Unhandled forked %s from %s:%d", + "Unhandled forked %s from %s:%d, response will be " + "handed over to the first dialog", pjsip_rx_data_get_info(rdata), rdata->pkt_info.src_name, rdata->pkt_info.src_port)); - - return PJ_TRUE; } } else if (dlg == (pjsip_dialog*)&dlg_set->dlg_list) { -- cgit v1.2.3