Opened 15 years ago
Closed 15 years ago
#1040 closed defect (fixed)
Problem with getting the default IP interface on FreeBSD due to wrong argument to connect() (thanks Roman Grachev for the patch)
Reported by: | bennylp | Owned by: | bennylp |
---|---|---|---|
Priority: | normal | Milestone: | release-1.6 |
Component: | pjlib | Version: | trunk |
Keywords: | Cc: | ||
Backport to 1.x milestone: | Backported: |
Description
Reported in this post:
There is a problem with getting default ip interface on FreeBSD: in function pj_getdefaultipinterface() the socket length passed to pj_sock_connect() seems to be incorrect (although in works fine on Windows, Linux and Max, I checked). The following patch fixes the problem:
Index: trunk/softphone/contrib/pj/pjlib/src/pj/sock_common.c =================================================================== --- a/trunk/softphone/contrib/pj/pjlib/src/pj/sock_common.c +++ b/trunk/softphone/contrib/pj/pjlib/src/pj/sock_common.c @@ -915,5 +915,5 @@ } - status = pj_sock_connect(fd, &a, sizeof(a)); + status = pj_sock_connect(fd, &a, pj_sockaddr_get_len(&a)); if (status != PJ_SUCCESS) { pj_sock_close(fd);
Roman Grachev
Change History (1)
comment:1 Changed 15 years ago by bennylp
- Resolution set to fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
Fixed in r3107