Changeset 6746

Show
Ignore:
Timestamp:
01/18/11 16:28:45 (2 years ago)
Author:
jow
Message:

libiwinfo: fail after 5 tries when there's no response from wpa_supplicant

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • luci/trunk/contrib/package/iwinfo/src/iwinfo_nl80211.c

    r6606 r6746  
    357357                                   const char *event) 
    358358{ 
     359    int numtry = 0; 
    359360    int sock = -1; 
    360361    char *rv = NULL; 
     
    396397    send(sock, cmd, strlen(cmd), 0); 
    397398 
    398     while( 1 ) 
     399    while( numtry++ < 5 ) 
    399400    { 
    400401        if( nl80211_wpactl_recv(sock, buffer, sizeof(buffer)) <= 0 )