mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
Fix client del bug
This commit is contained in:
parent
e9b02067eb
commit
b6d5f92a16
2 changed files with 8 additions and 2 deletions
|
@ -124,7 +124,7 @@ int kick_client(struct client_s client_entry) {
|
|||
break;
|
||||
}
|
||||
if(!mac_is_equal(client_entry.bssid_addr, probe_array[k].bssid_addr) &&
|
||||
own_score < eval_probe_metric(client_entry, probe_array[k]))
|
||||
own_score < eval_probe_metric(client_entry, probe_array[k])) // that's wrong! find client_entry OR write things in probe array struct!
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -134,6 +134,9 @@ int kick_client(struct client_s client_entry) {
|
|||
}
|
||||
|
||||
void kick_clients(uint8_t bssid[]) {
|
||||
pthread_mutex_lock(&probe_array_mutex);
|
||||
pthread_mutex_lock(&client_array_mutex);
|
||||
|
||||
// Seach for BSSID
|
||||
int i;
|
||||
for (i = 0; i <= client_entry_last; i++) {
|
||||
|
@ -158,6 +161,9 @@ void kick_clients(uint8_t bssid[]) {
|
|||
printf("STAAAY CLIENT!!!!!!!!!!!!!\n");
|
||||
}
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&probe_array_mutex);
|
||||
pthread_mutex_unlock(&client_array_mutex);
|
||||
}
|
||||
|
||||
int client_array_go_next_help(char sort_order[], int i, client entry,
|
||||
|
|
|
@ -178,7 +178,7 @@ static int hostapd_notify(struct ubus_context *ctx, struct ubus_object *obj,
|
|||
str = blobmsg_format_json(msg, true);
|
||||
send_string(str);
|
||||
|
||||
//printf("[WC] Hostapd-Probe: %s : %s\n", method, str);
|
||||
printf("[WC] Hostapd-Probe: %s : %s\n", method, str);
|
||||
|
||||
//print_array();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue