Changeset 5523 for pjproject


Ignore:
Timestamp:
Jan 12, 2017 2:22:18 AM (8 years ago)
Author:
nanang
Message:

Misc (re #1945): Fixed bug in NAT detect: missing address family assignment in socket binding (thanks Howard Chalkley for the report).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/src/pjnath/nat_detect.c

    r5359 r5523  
    181181 
    182182    addr_len = pj_sockaddr_get_len(server); 
    183     pj_bzero(&local, sizeof(pj_sockaddr)); 
     183    pj_sockaddr_init(server->addr.sa_family, &local, NULL, 0); 
    184184    status = pj_sock_bind(sock, &local, addr_len); 
    185185    if (status != PJ_SUCCESS) { 
     
    281281     * Bind to any. 
    282282     */ 
    283     pj_bzero(&sess->local_addr, sizeof(pj_sockaddr)); 
    284283    addr_len = pj_sockaddr_get_len(server); 
     284    pj_sockaddr_init(server->addr.sa_family, &sess->local_addr, NULL, 0); 
    285285    status = pj_sock_bind(sess->sock, &sess->local_addr, addr_len); 
    286286    if (status != PJ_SUCCESS) 
Note: See TracChangeset for help on using the changeset viewer.