- Timestamp:
- Oct 31, 2008 5:54:14 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/transport_srtp.c
r2360 r2361 647 647 pj_status_t status; 648 648 649 /* Attach itself to transport */650 status = pjmedia_transport_attach(srtp->member_tp, srtp, rem_addr, rem_rtcp,651 addr_len, &srtp_rtp_cb, &srtp_rtcp_cb);652 if (status != PJ_SUCCESS)653 return status;654 655 649 /* Save the callbacks */ 656 650 srtp->rtp_cb = rtp_cb; … … 658 652 srtp->user_data = user_data; 659 653 660 return status; 654 /* Attach itself to transport */ 655 status = pjmedia_transport_attach(srtp->member_tp, srtp, rem_addr, 656 rem_rtcp, addr_len, &srtp_rtp_cb, 657 &srtp_rtcp_cb); 658 if (status != PJ_SUCCESS) { 659 srtp->rtp_cb = NULL; 660 srtp->rtcp_cb = NULL; 661 srtp->user_data = NULL; 662 return status; 663 } 664 665 return PJ_SUCCESS; 661 666 } 662 667 … … 799 804 800 805 if (srtp->bypass_srtp) { 801 /* Callback may be NULL if we receive stray packets (or when packet 802 * is received while we're being detached/re-attached). 803 */ 804 if (srtp->rtp_cb) { 805 srtp->rtp_cb(srtp->user_data, pkt, size); 806 } 806 srtp->rtp_cb(srtp->user_data, pkt, size); 807 807 return; 808 808 } … … 864 864 865 865 if (srtp->bypass_srtp) { 866 /* Callback may be NULL if we receive stray packets (or when packet867 * is received while we're being detached/re-attached).868 */869 866 srtp->rtcp_cb(srtp->user_data, pkt, size); 870 867 return;
Note: See TracChangeset
for help on using the changeset viewer.