add counter to debug

This commit is contained in:
PolynomialDivision 2017-12-12 13:08:21 +01:00
parent 0c1527b8b5
commit 8113bd379b

View file

@ -31,14 +31,17 @@ int get_bandwidth_iwinfo(__uint8_t *client_addr, float *rx_rate, float *tx_rate)
int sucess = 0; int sucess = 0;
int count = 0;
while ((entry = readdir(dirp)) != NULL) { while ((entry = readdir(dirp)) != NULL) {
if (entry->d_type == DT_SOCK) { if (entry->d_type == DT_SOCK) {
printf("TRY TO GET BANDWITH: %d\n", count);
if(get_bandwith(entry->d_name, client_addr, rx_rate, tx_rate)) if(get_bandwith(entry->d_name, client_addr, rx_rate, tx_rate))
{ {
// bandwith found // bandwith found
sucess = 1; sucess = 1;
break; break;
} }
count++;
} }
} }
closedir(dirp); closedir(dirp);