Problem binding socket in nat_detect.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 

I am upgrading our code to use v2.5.5 of the PJSIP library: we use it to handle communication with TURN servers, in the game “Elite:Dangerous”

 

I found in unit testing after the upgrade that the call to detect the user’s NAT type was no longer working. The call in nat_detect.c to pj_sock_bind() was failing, returning a status code 130047

 

I found that adding the following additional line, (near line 285) to preset the address family within the local_addr before the bind call, fixed the problem:

 

    pj_bzero(&sess->local_addr, sizeof(pj_sockaddr));

    addr_len = pj_sockaddr_get_len(server);

    sess->local_addr.addr.sa_family = server->addr.sa_family; // added

    status = pj_sock_bind(sess->sock, &sess->local_addr, addr_len);

    if (status != PJ_SUCCESS)

       goto on_error;

 

I’m running a Windows 64 build, using Visual Studio 15, running on Windows 10 Pro

 

                Howard Chalkley

                Frontier Developments

                www.frontier.co.uk

 

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux