summaryrefslogtreecommitdiff
path: root/pjsip/src/pjsua-lib/pjsua_media.c
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/pjsua-lib/pjsua_media.c
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/pjsua-lib/pjsua_media.c')
-rw-r--r--pjsip/src/pjsua-lib/pjsua_media.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_media.c b/pjsip/src/pjsua-lib/pjsua_media.c
index 8ede0f8c..47cf1e7d 100644
--- a/pjsip/src/pjsua-lib/pjsua_media.c
+++ b/pjsip/src/pjsua-lib/pjsua_media.c
@@ -1311,6 +1311,13 @@ pj_status_t pjsua_media_channel_create_sdp(pjsua_call_id call_id,
#endif
call->audio_idx = find_audio_index(rem_sdp, srtp_active);
+ if (call->audio_idx == -1) {
+ /* No audio in the offer. We can't accept this */
+ PJ_LOG(4,(THIS_FILE,
+ "Unable to accept SDP offer without audio for call %d",
+ call_id));
+ return PJMEDIA_SDP_EINMEDIA;
+ }
}
/* Media index must have been determined before */