Changeset 4367
- Timestamp:
- Feb 21, 2013 8:49:19 PM (12 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/sdp.h
r3945 r4367 687 687 688 688 /** 689 * Perform semantic validation for the specified SDP session descriptor. 690 * This function perform validation beyond just syntactic verification, 691 * such as to verify the value of network type and address type, check 692 * the connection line, and verify that \a rtpmap attribute is present 693 * when dynamic payload type is used. 694 * 695 * @param sdp The SDP session descriptor to validate. 696 * @param strict Flag whether the check should be strict, i.e: allow 697 * media without connection line when port is zero. 698 * 699 * @return PJ_SUCCESS on success. 700 */ 701 PJ_DECL(pj_status_t) pjmedia_sdp_validate2(const pjmedia_sdp_session *sdp, 702 pj_bool_t strict); 703 704 705 /** 689 706 * Clone SDP session descriptor. 690 707 * -
pjproject/trunk/pjmedia/src/pjmedia/sdp.c
r3945 r4367 1424 1424 PJ_DEF(pj_status_t) pjmedia_sdp_validate(const pjmedia_sdp_session *sdp) 1425 1425 { 1426 return pjmedia_sdp_validate2(sdp, PJ_TRUE); 1427 } 1428 1429 1430 /* Validate SDP session descriptor. */ 1431 PJ_DEF(pj_status_t) pjmedia_sdp_validate2(const pjmedia_sdp_session *sdp, 1432 pj_bool_t strict) 1433 { 1426 1434 unsigned i; 1427 1435 const pj_str_t STR_RTPMAP = { "rtpmap", 6 }; … … 1472 1480 if (m->conn == NULL) { 1473 1481 if (sdp->conn == NULL) 1474 return PJMEDIA_SDP_EMISSINGCONN; 1482 if (strict || m->desc.port != 0) 1483 return PJMEDIA_SDP_EMISSINGCONN; 1475 1484 } 1476 1485 … … 1506 1515 } 1507 1516 1517 1508 1518 PJ_DEF(pj_status_t) pjmedia_sdp_transport_cmp( const pj_str_t *t1, 1509 1519 const pj_str_t *t2) -
pjproject/trunk/pjmedia/src/pjmedia/sdp_neg.c
r3980 r4367 139 139 140 140 /* Validate remote offer and initial answer */ 141 status = pjmedia_sdp_validate (remote);141 status = pjmedia_sdp_validate2(remote, PJ_FALSE); 142 142 if (status != PJ_SUCCESS) 143 143 return status; -
pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c
r4351 r4367 830 830 &sdp_info->sdp); 831 831 if (status == PJ_SUCCESS) 832 status = pjmedia_sdp_validate (sdp_info->sdp);832 status = pjmedia_sdp_validate2(sdp_info->sdp, PJ_FALSE); 833 833 834 834 if (status != PJ_SUCCESS) {
Note: See TracChangeset
for help on using the changeset viewer.