From 1b6df9b374d9e31d88854d5a270b48e26e55691e Mon Sep 17 00:00:00 2001 From: Liong Sauw Ming Date: Tue, 6 Dec 2016 10:58:48 +0000 Subject: Re #1982: Cleanup call setting flags even if callbacks on_call_tx/rx_offer() not implemented Otherwise this could cause media to be unintentionally reinitialized on re-INVITEs/updates. Refer to ticket #1793. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5492 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/src/pjsua-lib/pjsua_call.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c index 2089fc16..b3a07184 100644 --- a/pjsip/src/pjsua-lib/pjsua_call.c +++ b/pjsip/src/pjsua-lib/pjsua_call.c @@ -4111,13 +4111,13 @@ static void pjsua_call_on_rx_offer(pjsip_inv_session *inv, goto on_return; } + cleanup_call_setting_flag(&call->opt); + if (pjsua_var.ua_cfg.cb.on_call_rx_offer) { pjsip_status_code code = PJSIP_SC_OK; pjsua_call_setting opt; - cleanup_call_setting_flag(&call->opt); opt = call->opt; - (*pjsua_var.ua_cfg.cb.on_call_rx_offer)(call->index, offer, NULL, &code, &opt); @@ -4243,8 +4243,9 @@ static void pjsua_call_on_create_offer(pjsip_inv_session *inv, } #endif + cleanup_call_setting_flag(&call->opt); + if (pjsua_var.ua_cfg.cb.on_call_tx_offer) { - cleanup_call_setting_flag(&call->opt); (*pjsua_var.ua_cfg.cb.on_call_tx_offer)(call->index, NULL, &call->opt); } -- cgit v1.2.3