mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
change to ubus timeout
This commit is contained in:
parent
ed725710d7
commit
8e1262c7f8
3 changed files with 5 additions and 14 deletions
|
@ -37,6 +37,8 @@ struct time_config_s {
|
|||
time_t update_hostapd;
|
||||
};
|
||||
|
||||
struct time_config_s timeout_config;
|
||||
|
||||
// ---------------- Global variables ----------------
|
||||
struct probe_metric_s dawn_metric;
|
||||
|
||||
|
|
|
@ -147,6 +147,7 @@ int main(int argc, char **argv) {
|
|||
gcrypt_set_key_and_iv(shared_key, iv);
|
||||
|
||||
struct time_config_s time_config = uci_get_time_config();
|
||||
timeout_config = time_config; // TODO: Refactor...
|
||||
|
||||
if (pthread_mutex_init(&list_mutex, NULL) != 0) {
|
||||
printf("\n mutex init failed\n");
|
||||
|
|
|
@ -603,20 +603,8 @@ void *update_clients_thread(void *arg) {
|
|||
}
|
||||
|
||||
void update_hostapd_sockets(struct uloop_timeout *t) {
|
||||
//uloop_init();
|
||||
//time_t time_update_hostapd = *(time_t *) arg;
|
||||
|
||||
//printf("Update hostapd thread with time: %lu\n", time_update_hostapd);
|
||||
//const char *ubus_socket = NULL;
|
||||
//ctx_hostapd = ubus_connect(ubus_socket);
|
||||
//ubus_add_uloop(ctx_hostapd);
|
||||
//uloop_run();
|
||||
uloop_timeout_set(&hostapd_timer, 1000);
|
||||
|
||||
// while (1) {
|
||||
subscribe_to_hostapd_interfaces(hostapd_dir_glob);
|
||||
// sleep(time_update_hostapd);
|
||||
// }
|
||||
uloop_timeout_set(&hostapd_timer, timeout_config.update_hostapd);
|
||||
subscribe_to_hostapd_interfaces(hostapd_dir_glob);
|
||||
}
|
||||
|
||||
void del_client_all_interfaces(const uint8_t *client_addr, uint32_t reason, uint8_t deauth, uint32_t ban_time) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue