Changeset 5750
- Timestamp:
- Mar 6, 2018 7:42:54 AM (7 years ago)
- Location:
- pjproject/trunk/pjmedia
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/transport.h
r5478 r5750 683 683 */ 684 684 PJ_INLINE(pj_status_t) pjmedia_transport_attach2(pjmedia_transport *tp, 685 685 pjmedia_transport_attach_param *att_param) 686 686 { 687 687 if (tp->op->attach2) { 688 return tp->op->attach2(tp, att_param);688 return (*tp->op->attach2)(tp, att_param); 689 689 } else { 690 return tp->op->attach(tp, att_param->user_data,691 692 693 694 690 return (*tp->op->attach)(tp, att_param->user_data, 691 (pj_sockaddr_t*)&att_param->rem_addr, 692 (pj_sockaddr_t*)&att_param->rem_rtcp, 693 att_param->addr_len, att_param->rtp_cb, 694 att_param->rtcp_cb); 695 695 } 696 696 } … … 730 730 pj_ssize_t)) 731 731 { 732 return tp->op->attach(tp, user_data, rem_addr, rem_rtcp, addr_len, 733 rtp_cb, rtcp_cb); 732 if (tp->op->attach2) { 733 pjmedia_transport_attach_param param; 734 735 pj_bzero(¶m, sizeof(param)); 736 param.user_data = user_data; 737 pj_sockaddr_cp(¶m.rem_addr, rem_addr); 738 pj_sockaddr_cp(¶m.rem_rtcp, rem_rtcp); 739 param.addr_len = addr_len; 740 param.rtp_cb = rtp_cb; 741 param.rtcp_cb = rtcp_cb; 742 743 return (*tp->op->attach2)(tp, ¶m); 744 } else { 745 return (*tp->op->attach)(tp, user_data, rem_addr, rem_rtcp, addr_len, 746 rtp_cb, rtcp_cb); 747 } 734 748 } 735 749 … … 750 764 void *user_data) 751 765 { 752 tp->op->detach(tp, user_data);766 (*tp->op->detach)(tp, user_data); 753 767 } 754 768 -
pjproject/trunk/pjmedia/src/pjmedia/transport_srtp_dtls.c
r5746 r5750 957 957 958 958 pj_bzero(&ap, sizeof(ap)); 959 ap.user_data = ds->srtp; 959 960 pj_sockaddr_cp(&ds->rem_addr, &info.src_rtp_name); 960 961 pj_sockaddr_cp(&ap.rem_addr, &ds->rem_addr); … … 1143 1144 pjmedia_transport_attach_param ap; 1144 1145 pj_bzero(&ap, sizeof(ap)); 1146 ap.user_data = ds->srtp; 1145 1147 1146 1148 if (sdp_remote) … … 1294 1296 pjmedia_transport_attach_param ap; 1295 1297 pj_bzero(&ap, sizeof(ap)); 1298 ap.user_data = ds->srtp; 1296 1299 1297 1300 /* Attach ourselves to member transport for DTLS nego. */ … … 1421 1424 /* Attach member transport, so we can send/receive DTLS init packets */ 1422 1425 pj_bzero(&ap, sizeof(ap)); 1426 ap.user_data = ds->srtp; 1423 1427 pj_sockaddr_cp(&ap.rem_addr, &ds->rem_addr); 1424 1428 pj_sockaddr_cp(&ap.rem_rtcp, &ds->rem_rtcp); -
pjproject/trunk/pjmedia/src/pjmedia/transport_udp.c
r5747 r5750 839 839 840 840 /* As additional checking, check if the same user data is specified */ 841 pj_assert( user_data == udp->user_data);841 pj_assert(!udp->user_data || user_data == udp->user_data); 842 842 843 843 /* First, mark transport as unattached */
Note: See TracChangeset
for help on using the changeset viewer.