Changeset 2291
- Timestamp:
- Sep 17, 2008 3:32:06 PM (16 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/transport.h
r2262 r2291 492 492 */ 493 493 pjmedia_sock_info sock_info; 494 495 /** 496 * Remote address where RTP/RTCP originated from. 497 */ 498 pj_sockaddr rem_rtp_name; 499 pj_sockaddr rem_rtcp_name; 494 500 495 501 /** -
pjproject/trunk/pjmedia/src/pjmedia/transport_ice.c
r2276 r2291 1425 1425 } 1426 1426 1427 /* Get remote address originating RTP & RTCP. */ 1428 info->rem_rtp_name = tp_ice->rtp_src_addr; 1429 info->rem_rtcp_name = tp_ice->rtcp_src_addr; 1430 1427 1431 return PJ_SUCCESS; 1428 1432 } … … 1548 1552 */ 1549 1553 if (!tp_ice->use_ice && 1550 (tp_ice->options & PJMEDIA_ICE_NO_SRC_ADDR_CHECKING) == 0 &&1551 1554 pj_sockaddr_cmp(&tp_ice->remote_rtp, src_addr) != 0 ) 1552 1555 { … … 1562 1565 tp_ice->rtp_src_cnt++; 1563 1566 1564 if (tp_ice->rtp_src_cnt >= PJMEDIA_RTP_NAT_PROBATION_CNT) { 1567 if ((tp_ice->options & PJMEDIA_ICE_NO_SRC_ADDR_CHECKING) == 0 && 1568 tp_ice->rtp_src_cnt >= PJMEDIA_RTP_NAT_PROBATION_CNT) 1569 { 1565 1570 1566 1571 char addr_text[80]; … … 1606 1611 */ 1607 1612 if (!tp_ice->use_ice && 1608 (tp_ice->options & PJMEDIA_ICE_NO_SRC_ADDR_CHECKING)==0 &&1609 1613 pj_sockaddr_cmp(&tp_ice->remote_rtcp, src_addr) != 0) 1610 1614 { 1611 char addr_text[80];1612 1613 pj_sockaddr_cp(&tp_ice->remote_rtcp, src_addr);1614 1615 pj_sockaddr_cp(&tp_ice->rtcp_src_addr, src_addr); 1615 1616 1616 pj_assert(tp_ice->addr_len == pj_sockaddr_get_len(src_addr)); 1617 1618 PJ_LOG(4,(tp_ice->base.name, 1619 "Remote RTCP address switched to %s", 1620 pj_sockaddr_print(&tp_ice->remote_rtcp, addr_text, 1621 sizeof(addr_text), 3))); 1617 if ((tp_ice->options & PJMEDIA_ICE_NO_SRC_ADDR_CHECKING)==0) { 1618 char addr_text[80]; 1619 1620 pj_sockaddr_cp(&tp_ice->remote_rtcp, src_addr); 1621 1622 pj_assert(tp_ice->addr_len == pj_sockaddr_get_len(src_addr)); 1623 1624 PJ_LOG(4,(tp_ice->base.name, 1625 "Remote RTCP address switched to %s", 1626 pj_sockaddr_print(&tp_ice->remote_rtcp, addr_text, 1627 sizeof(addr_text), 3))); 1628 } 1622 1629 } 1623 1630 } -
pjproject/trunk/pjmedia/src/pjmedia/transport_udp.c
r2129 r2291 606 606 info->sock_info.rtcp_addr_name = udp->rtcp_addr_name; 607 607 608 /* Get remote address originating RTP & RTCP. */ 609 info->rem_rtp_name = udp->rtp_src_addr; 610 info->rem_rtcp_name = udp->rtcp_src_addr; 611 608 612 return PJ_SUCCESS; 609 613 } -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r2266 r2291 2019 2019 static void dump_media_session(const char *indent, 2020 2020 char *buf, unsigned maxlen, 2021 pj media_session *session)2021 pjsua_call *call) 2022 2022 { 2023 2023 unsigned i; … … 2025 2025 int len; 2026 2026 pjmedia_session_info info; 2027 2027 pjmedia_session *session = call->session; 2028 pjmedia_transport_info tp_info; 2029 2030 pjmedia_transport_info_init(&tp_info); 2031 2032 pjmedia_transport_get_info(call->med_tp, &tp_info); 2028 2033 pjmedia_session_get_info(session, &info); 2029 2034 … … 2038 2043 2039 2044 pjmedia_session_get_stream_stat(session, i, &stat); 2040 rem_addr = pj_sockaddr_print(&info.stream_info[i].rem_addr, 2041 rem_addr_buf, sizeof(rem_addr_buf), 3); 2045 // rem_addr will contain actual address of RTP originator, instead of 2046 // remote RTP address specified by stream which is fetched from the SDP. 2047 // Please note that we are assuming only one stream per call. 2048 //rem_addr = pj_sockaddr_print(&info.stream_info[i].rem_addr, 2049 // rem_addr_buf, sizeof(rem_addr_buf), 3); 2050 if (pj_sockaddr_has_addr(&tp_info.rem_rtp_name)) { 2051 rem_addr = pj_sockaddr_print(&tp_info.rem_rtp_name, rem_addr_buf, 2052 sizeof(rem_addr_buf), 3); 2053 } else { 2054 pj_ansi_snprintf(rem_addr_buf, sizeof(rem_addr_buf), "-"); 2055 } 2042 2056 2043 2057 if (info.stream_info[i].dir == PJMEDIA_DIR_ENCODING) … … 2628 2642 /* Print call info */ 2629 2643 void print_call(const char *title, 2630 2631 2644 int call_id, 2645 char *buf, pj_size_t size) 2632 2646 { 2633 2647 int len; … … 2759 2773 /* Dump session statistics */ 2760 2774 if (with_media && call->session) 2761 dump_media_session(indent, p, end-p, call ->session);2775 dump_media_session(indent, p, end-p, call); 2762 2776 2763 2777 pjsip_dlg_dec_lock(dlg);
Note: See TracChangeset
for help on using the changeset viewer.