summaryrefslogtreecommitdiff
path: root/pjsip/src/pjsip-ua
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2010-12-02 10:41:46 +0000
committerBenny Prijono <bennylp@teluu.com>2010-12-02 10:41:46 +0000
commit883911360b9cb89f2b9da545a5745a34d1eaf6f4 (patch)
treef6caa5e91500ac56c3798d2b587a9a6de9ac2d4b /pjsip/src/pjsip-ua
parent0804e1cbdc9582e626f29c267e39d4044e67298a (diff)
Fixed #1170 (Assertion when receiving updated SDP offer with all media lines removed):
- pjsua_media.c checks if audio media is present in the offer; if not, do not set any answer - sip_inv.c checks if app has supplied an answer after on_rx_offer() callback is called, and returnd 488 (Not Acceptable) if not (previously, it will return 200/OK without SDP!) - added a SIPp scenario file to reproduce this git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3383 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsip-ua')
-rw-r--r--pjsip/src/pjsip-ua/sip_inv.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/pjsip/src/pjsip-ua/sip_inv.c b/pjsip/src/pjsip-ua/sip_inv.c
index aebd3353..b9bfe896 100644
--- a/pjsip/src/pjsip-ua/sip_inv.c
+++ b/pjsip/src/pjsip-ua/sip_inv.c
@@ -1743,13 +1743,19 @@ static pj_status_t inv_check_sdp_in_incoming_msg( pjsip_inv_session *inv,
}
/* Inform application about remote offer. */
-
if (mod_inv.cb.on_rx_offer && inv->notify) {
(*mod_inv.cb.on_rx_offer)(inv, sdp_info->sdp);
}
+ /* application must have supplied an answer at this point. */
+ if (pjmedia_sdp_neg_get_state(inv->neg) !=
+ PJMEDIA_SDP_NEG_STATE_WAIT_NEGO)
+ {
+ return PJ_EINVALIDOP;
+ }
+
} else if (pjmedia_sdp_neg_get_state(inv->neg) ==
PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER)
{