Changeset 2885
- Timestamp:
- Aug 17, 2009 9:06:31 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/transport_srtp.c
r2832 r2885 333 333 unsigned i; 334 334 335 pj_assert(opt); 336 335 337 pj_bzero(opt, sizeof(pjmedia_srtp_setting)); 336 338 opt->close_member_tp = PJ_TRUE; … … 358 360 unsigned i; 359 361 360 PJ_ASSERT_RETURN(endpt && p_tp, PJ_EINVAL);362 PJ_ASSERT_RETURN(endpt && tp && p_tp, PJ_EINVAL); 361 363 362 364 /* Check crypto availability */ … … 459 461 int au_rx_idx = 0; 460 462 int crypto_suites_cnt; 463 464 PJ_ASSERT_RETURN(tp && tx && rx, PJ_EINVAL); 461 465 462 466 if (srtp->session_inited) { … … 586 590 err_status_t err; 587 591 592 PJ_ASSERT_RETURN(srtp, PJ_EINVAL); 593 588 594 if (!p_srtp->session_inited) 589 595 return PJ_SUCCESS; … … 659 665 pj_status_t status; 660 666 667 PJ_ASSERT_RETURN(tp && rem_addr && addr_len, PJ_EINVAL); 668 661 669 /* Save the callbacks */ 662 670 srtp->rtp_cb = rtp_cb; … … 779 787 { 780 788 transport_srtp *srtp = (transport_srtp *) tp; 789 790 PJ_ASSERT_RETURN(tp, PJ_EINVAL); 781 791 782 792 return pjmedia_transport_simulate_lost(srtp->member_tp, dir, pct_lost); … … 788 798 pj_status_t status; 789 799 800 PJ_ASSERT_RETURN(tp, PJ_EINVAL); 801 790 802 pj_lock_acquire(srtp->mutex); 791 803 792 pjmedia_transport_detach(tp, NULL);793 794 804 if (srtp->setting.close_member_tp && srtp->member_tp) { 795 805 pjmedia_transport_close(srtp->member_tp); … … 1087 1097 1088 1098 pjmedia_sdp_media *m_rem; 1089 1099 1090 1100 m_rem = sdp_remote->media[media_index]; 1091 1101 … … 1490 1500 pj_status_t status; 1491 1501 1502 PJ_ASSERT_RETURN(tp, PJ_EINVAL); 1503 1492 1504 status = pjmedia_transport_media_stop(srtp->member_tp); 1493 1505 if (status != PJ_SUCCESS) … … 1510 1522 return PJ_SUCCESS; 1511 1523 1512 PJ_ASSERT_RETURN( *pkt_len>0, PJ_EINVAL);1524 PJ_ASSERT_RETURN(tp && pkt && (*pkt_len>0), PJ_EINVAL); 1513 1525 PJ_ASSERT_RETURN(srtp->session_inited, PJ_EINVALIDOP); 1514 1526
Note: See TracChangeset
for help on using the changeset viewer.