mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
treewide: rework mutex
Wrap mutex calls with traceable messages to help debugging resource locks. [cleanup commit message] Signed-off-by: Nick Hainke <vincent@systemli.org>
This commit is contained in:
parent
0a962bea1f
commit
be49c35686
6 changed files with 76 additions and 46 deletions
|
|
@ -229,11 +229,11 @@ int handle_deauth_req(struct blob_attr* msg) {
|
|||
|
||||
dawnlog_debug_func("Entering...");
|
||||
|
||||
pthread_mutex_lock(&client_array_mutex);
|
||||
dawn_mutex_lock(&client_array_mutex);
|
||||
|
||||
client_array_delete_bc(notify_req.bssid_addr, notify_req.client_addr);
|
||||
|
||||
pthread_mutex_unlock(&client_array_mutex);
|
||||
dawn_mutex_unlock(&client_array_mutex);
|
||||
|
||||
dawnlog_debug("[WC] Deauth: %s\n", "deauth");
|
||||
|
||||
|
|
@ -434,7 +434,7 @@ dump_client(struct blob_attr** tb, struct dawn_mac client_addr, const char* bssi
|
|||
memset(client_entry->signature, 0, SIGNATURE_LEN);
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&client_array_mutex);
|
||||
dawn_mutex_lock(&client_array_mutex);
|
||||
// If entry was already in list we get back the old entry, which needs to be freed
|
||||
client* prev_entry = client_array_update_entry(client_entry, time(0));
|
||||
if (prev_entry)
|
||||
|
|
@ -443,7 +443,7 @@ dump_client(struct blob_attr** tb, struct dawn_mac client_addr, const char* bssi
|
|||
prev_entry = NULL;
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&client_array_mutex);
|
||||
dawn_mutex_unlock(&client_array_mutex);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue