- Timestamp:
- Dec 2, 2010 10:56:27 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/transport_srtp.c
r3376 r3384 349 349 350 350 351 static pj_bool_t srtp_crypto_empty(const pjmedia_srtp_crypto* c) 352 { 353 return (c->name.slen==0 || c->key.slen==0); 354 } 355 356 351 357 PJ_DEF(void) pjmedia_srtp_setting_default(pjmedia_srtp_setting *opt) 352 358 { … … 1223 1229 PJ_ASSERT_RETURN(tp && sdp_pool && sdp_local, PJ_EINVAL); 1224 1230 1231 pj_bzero(&srtp->rx_policy_neg, sizeof(srtp->rx_policy_neg)); 1232 pj_bzero(&srtp->tx_policy_neg, sizeof(srtp->tx_policy_neg)); 1233 1225 1234 srtp->offerer_side = sdp_remote == NULL; 1226 srtp->bypass_srtp = PJ_FALSE;1227 1235 1228 1236 m_rem = sdp_remote ? sdp_remote->media[media_index] : NULL; … … 1436 1444 1437 1445 BYPASS_SRTP: 1438 srtp->bypass_srtp = PJ_TRUE; 1446 /* Do not update this flag here as actually the media session hasn't been 1447 * updated. 1448 */ 1449 //srtp->bypass_srtp = PJ_TRUE; 1439 1450 1440 1451 PROPAGATE_MEDIA_CREATE: … … 1457 1468 1458 1469 PJ_ASSERT_RETURN(tp && pool && sdp_local && sdp_remote, PJ_EINVAL); 1459 1460 if (srtp->bypass_srtp)1461 goto BYPASS_SRTP;1462 1470 1463 1471 m_rem = sdp_remote->media[media_index]; … … 1556 1564 } 1557 1565 1566 /* Make sure we have the SRTP policies */ 1567 if (srtp_crypto_empty(&srtp->tx_policy_neg) || 1568 srtp_crypto_empty(&srtp->rx_policy_neg)) 1569 { 1570 goto BYPASS_SRTP; 1571 } 1572 1558 1573 /* Reset probation counts */ 1559 1574 srtp->probation_cnt = PROBATION_CNT_INIT; … … 1575 1590 } 1576 1591 1592 srtp->bypass_srtp = PJ_FALSE; 1593 1577 1594 goto PROPAGATE_MEDIA_START; 1578 1595
Note: See TracChangeset
for help on using the changeset viewer.