Changeset 1621
- Timestamp:
- Dec 5, 2007 5:08:29 AM (17 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/sock_bsd.c
r1601 r1621 123 123 const int PJ_MSG_DONTROUTE = MSG_DONTROUTE; 124 124 125 126 #if 0 127 static void CHECK_ADDR_LEN(const pj_sockaddr *addr, int len) 128 { 129 pj_sockaddr *a = (pj_sockaddr*)addr; 130 pj_assert((a->addr.sa_family==PJ_AF_INET && len==sizeof(pj_sockaddr_in)) || 131 (a->addr.sa_family==PJ_AF_INET6 && len==sizeof(pj_sockaddr_in6))); 132 133 } 134 #else 135 #define CHECK_ADDR_LEN(addr,len) 136 #endif 125 137 126 138 /* … … 450 462 #endif 451 463 452 453 464 /* 454 465 * Bind socket. … … 461 472 462 473 PJ_ASSERT_RETURN(addr && len >= (int)sizeof(struct sockaddr_in), PJ_EINVAL); 474 475 CHECK_ADDR_LEN(addr, len); 463 476 464 477 if (bind(sock, (struct sockaddr*)addr, len) != 0) … … 575 588 PJ_CHECK_STACK(); 576 589 PJ_ASSERT_RETURN(len, PJ_EINVAL); 590 591 CHECK_ADDR_LEN(to, tolen); 577 592 578 593 *len = sendto(sock, (const char*)buf, *len, flags, -
pjproject/trunk/pjmedia/src/pjmedia/stream.c
r1468 r1621 1369 1369 /* Only attach transport when stream is ready. */ 1370 1370 status = pjmedia_transport_attach(tp, stream, &info->rem_addr, 1371 &info->rem_rtcp, sizeof(info->rem_addr), 1371 &info->rem_rtcp, 1372 pj_sockaddr_get_len(&info->rem_addr), 1372 1373 &on_rx_rtp, &on_rx_rtcp); 1373 1374 if (status != PJ_SUCCESS) -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
r1618 r1621 1238 1238 } 1239 1239 1240 status = pj_sock_bind(sock, &bind_addr, sizeof(bind_addr));1240 status = pj_sock_bind(sock, &bind_addr, pj_sockaddr_get_len(&bind_addr)); 1241 1241 if (status != PJ_SUCCESS) { 1242 1242 pjsua_perror(THIS_FILE, "bind() error", status);
Note: See TracChangeset
for help on using the changeset viewer.