Ignore:
Timestamp:
Feb 21, 2013 8:49:19 PM (12 years ago)
Author:
nanang
Message:

Close #1625: Introduced new API pjmedia_sdp_validate2() for allowing SDP media without c= line when port is zero, currently it is only applied in validating remote SDP.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/sdp.c

    r3945 r4367  
    14241424PJ_DEF(pj_status_t) pjmedia_sdp_validate(const pjmedia_sdp_session *sdp) 
    14251425{ 
     1426    return pjmedia_sdp_validate2(sdp, PJ_TRUE); 
     1427} 
     1428 
     1429 
     1430/* Validate SDP session descriptor. */ 
     1431PJ_DEF(pj_status_t) pjmedia_sdp_validate2(const pjmedia_sdp_session *sdp, 
     1432                                          pj_bool_t strict) 
     1433{ 
    14261434    unsigned i; 
    14271435    const pj_str_t STR_RTPMAP = { "rtpmap", 6 }; 
     
    14721480        if (m->conn == NULL) { 
    14731481            if (sdp->conn == NULL) 
    1474                 return PJMEDIA_SDP_EMISSINGCONN; 
     1482                if (strict || m->desc.port != 0) 
     1483                    return PJMEDIA_SDP_EMISSINGCONN; 
    14751484        } 
    14761485 
     
    15061515} 
    15071516 
     1517 
    15081518PJ_DEF(pj_status_t) pjmedia_sdp_transport_cmp( const pj_str_t *t1, 
    15091519                                               const pj_str_t *t2) 
Note: See TracChangeset for help on using the changeset viewer.