mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
fix if own station is already connected
This commit is contained in:
parent
3456d526f3
commit
061a477a20
1 changed files with 9 additions and 2 deletions
|
@ -271,14 +271,21 @@ int compare_station_count(uint8_t *bssid_addr_own, uint8_t *bssid_addr_to_compar
|
||||||
return ((int)ap_entry_own.station_count - 1) > (int)ap_entry_to_compre.station_count;
|
return ((int)ap_entry_own.station_count - 1) > (int)ap_entry_to_compre.station_count;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
int sta_count = ap_entry_own.station_count;
|
||||||
int sta_count_to_compare = ap_entry_to_compre.station_count;
|
int sta_count_to_compare = ap_entry_to_compre.station_count;
|
||||||
|
if(is_connected(bssid_addr_own, client_addr))
|
||||||
|
{
|
||||||
|
printf("OWN IS ALREADY CONNECTED! DECREASE COUNTER!!!\n");
|
||||||
|
sta_count--;
|
||||||
|
}
|
||||||
|
|
||||||
if(is_connected(bssid_addr_to_compare, client_addr))
|
if(is_connected(bssid_addr_to_compare, client_addr))
|
||||||
{
|
{
|
||||||
printf("IS ALREADY CONNECTED! DECREASE COUNTER!!!\n");
|
printf("COMPARE IS ALREADY CONNECTED! DECREASE COUNTER!!!\n");
|
||||||
sta_count_to_compare--;
|
sta_count_to_compare--;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (int)ap_entry_own.station_count > sta_count_to_compare;
|
return sta_count > sta_count_to_compare;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue