Changeset 705 for pjproject/trunk
- Timestamp:
- Sep 11, 2006 10:56:26 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/transport_udp.c
r637 r705 18 18 */ 19 19 #include <pjmedia/transport_udp.h> 20 #include <pj/addr_resolv.h> 20 21 #include <pj/assert.h> 21 22 #include <pj/errno.h> … … 243 244 tp->rtcp_addr_name = si->rtcp_addr_name; 244 245 246 /* If address is 0.0.0.0, use host's IP address */ 247 if (tp->rtp_addr_name.sin_addr.s_addr == 0) { 248 pj_hostent he; 249 const pj_str_t *hostname = pj_gethostname(); 250 status = pj_gethostbyname(hostname, &he); 251 if (status != PJ_SUCCESS) { 252 goto on_error; 253 } 254 tp->rtp_addr_name.sin_addr = *(pj_in_addr*)he.h_addr; 255 } 256 257 /* Same with RTCP */ 258 if (tp->rtcp_addr_name.sin_addr.s_addr == 0) { 259 tp->rtcp_addr_name.sin_addr.s_addr = tp->rtp_addr_name.sin_addr.s_addr; 260 } 245 261 246 262 /* Setup RTP socket with the ioqueue */
Note: See TracChangeset
for help on using the changeset viewer.