Changeset 4355 for pjproject


Ignore:
Timestamp:
Feb 19, 2013 4:27:37 PM (12 years ago)
Author:
bennylp
Message:

More #1613: fixed bugs in the 'fixes' above:

  • the socket was closed when ioctl() is called
  • the 'iff' structure was not initialized
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/ip_helper_generic.c

    r4327 r4355  
    166166    } 
    167167 
    168     /* Done with socket */ 
    169     pj_sock_close(sock); 
    170  
    171168    /* Interface interfaces */ 
    172169    ifr = (struct ifreq*) ifc.ifc_req; 
     
    178175    for (i=0; i<count; ++i) { 
    179176        struct ifreq *itf = &ifr[i]; 
    180         struct ifreq iff; 
     177        struct ifreq iff = *itf; 
    181178        struct sockaddr *ad = &itf->ifr_addr; 
    182179         
     
    228225    } 
    229226 
     227    /* Done with socket */ 
     228    pj_sock_close(sock); 
     229 
    230230    TRACE_((THIS_FILE, "done, found %d address(es)", *p_cnt)); 
    231231    return (*p_cnt != 0) ? PJ_SUCCESS : PJ_ENOTFOUND; 
    232232} 
     233 
    233234 
    234235#elif defined(PJ_HAS_NET_IF_H) && PJ_HAS_NET_IF_H != 0 
Note: See TracChangeset for help on using the changeset viewer.