Opened 14 years ago

Closed 14 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:


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) {

Roman Grachev

Change History (1)

comment:1 Changed 14 years ago by bennylp

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r3107

Note: See TracTickets for help on using tickets.