Changeset 3383


Ignore:
Timestamp:
Dec 2, 2010 10:41:46 AM (13 years ago)
Author:
bennylp
Message:

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
Location:
pjproject/trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c

    r3381 r3383  
    17441744 
    17451745        /* Inform application about remote offer. */ 
    1746  
    17471746        if (mod_inv.cb.on_rx_offer && inv->notify) { 
    17481747 
    17491748            (*mod_inv.cb.on_rx_offer)(inv, sdp_info->sdp); 
    17501749 
     1750        } 
     1751 
     1752        /* application must have supplied an answer at this point. */ 
     1753        if (pjmedia_sdp_neg_get_state(inv->neg) != 
     1754                PJMEDIA_SDP_NEG_STATE_WAIT_NEGO) 
     1755        { 
     1756            return PJ_EINVALIDOP; 
    17511757        } 
    17521758 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c

    r3376 r3383  
    13121312 
    13131313        call->audio_idx = find_audio_index(rem_sdp, srtp_active); 
     1314        if (call->audio_idx == -1) { 
     1315            /* No audio in the offer. We can't accept this */ 
     1316            PJ_LOG(4,(THIS_FILE, 
     1317                      "Unable to accept SDP offer without audio for call %d", 
     1318                      call_id)); 
     1319            return PJMEDIA_SDP_EINMEDIA; 
     1320        } 
    13141321    } 
    13151322 
Note: See TracChangeset for help on using the changeset viewer.