Changeset 2355 for pjproject/trunk
- Timestamp:
- Oct 21, 2008 5:38:42 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/transport_ice.c
r2345 r2355 806 806 } 807 807 808 /* Verify address family matches */ 809 if ((tp_ice->af==pj_AF_INET() && 810 pj_strcmp(&rtcp_attr.addr_type, &STR_IP4)!=0) || 811 (tp_ice->af==pj_AF_INET6() && 812 pj_strcmp(&rtcp_attr.addr_type, &STR_IP6)!=0)) 813 { 814 return PJMEDIA_SDP_ETPORTNOTEQUAL; 815 } 816 817 /* Assign RTCP address */ 818 status = pj_sockaddr_init(tp_ice->af, &rtcp_addr, 819 &rtcp_attr.addr, 820 (pj_uint16_t)rtcp_attr.port); 821 if (status != PJ_SUCCESS) { 822 return PJMEDIA_SDP_EINRTCP; 808 if (rtcp_attr.addr.slen) { 809 /* Verify address family matches */ 810 if ((tp_ice->af==pj_AF_INET() && 811 pj_strcmp(&rtcp_attr.addr_type, &STR_IP4)!=0) || 812 (tp_ice->af==pj_AF_INET6() && 813 pj_strcmp(&rtcp_attr.addr_type, &STR_IP6)!=0)) 814 { 815 return PJMEDIA_SDP_ETPORTNOTEQUAL; 816 } 817 818 /* Assign RTCP address */ 819 status = pj_sockaddr_init(tp_ice->af, &rtcp_addr, 820 &rtcp_attr.addr, 821 (pj_uint16_t)rtcp_attr.port); 822 if (status != PJ_SUCCESS) { 823 return PJMEDIA_SDP_EINRTCP; 824 } 825 } else { 826 /* Assign RTCP address */ 827 status = pj_sockaddr_init(tp_ice->af, &rtcp_addr, 828 NULL, 829 (pj_uint16_t)rtcp_attr.port); 830 if (status != PJ_SUCCESS) { 831 return PJMEDIA_SDP_EINRTCP; 832 } 833 pj_sockaddr_copy_addr(&rtcp_addr, &rem_conn_addr); 823 834 } 824 835
Note: See TracChangeset
for help on using the changeset viewer.