From ee47d9afa76a2e9b375b46021f8047a84ee14220 Mon Sep 17 00:00:00 2001 From: PolynomialDivision Date: Sat, 26 Aug 2017 11:22:51 +0200 Subject: [PATCH] Try to fix auth handler --- src/main.c | 4 ++-- src/utils/ubus.c | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main.c b/src/main.c index 4200cf4..7d7b394 100644 --- a/src/main.c +++ b/src/main.c @@ -90,8 +90,8 @@ int main(int argc, char **argv) { //pthread_t tid_get_client; //pthread_create(&tid_get_client, NULL, &update_clients_thread, NULL); - pthread_t tid_kick_clients; - pthread_create(&tid_kick_clients, NULL, &kick_clients_thread, NULL); + //pthread_t tid_kick_clients; + //pthread_create(&tid_kick_clients, NULL, &kick_clients_thread, NULL); //pthread_create(&tid, NULL, &remove_thread, NULL); diff --git a/src/utils/ubus.c b/src/utils/ubus.c index fbc285f..442cae8 100644 --- a/src/utils/ubus.c +++ b/src/utils/ubus.c @@ -213,7 +213,7 @@ int parse_to_probe_req(struct blob_attr *msg, probe_entry *prob_req) { static int handle_auth_req(struct blob_attr *msg) { printf("HANDLE AUTH!\n"); - + return UBUS_STATUS_CONNECTION_FAILED; auth_entry auth_req; parse_to_auth_req(msg, &auth_req); @@ -270,9 +270,11 @@ static int handle_probe_req(struct blob_attr *msg) { static int hostapd_notify(struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req, const char *method, struct blob_attr *msg) { - //return UBUS_STATUS_UNKNOWN_ERROR; - printf("METHOD: %s\n",method); + sleep(1); + printf("Rjection by Ubus handler: %d\n", UBUS_STATUS_CONNECTION_FAILED); + return UBUS_STATUS_CONNECTION_FAILED; + // TODO: Only handle probe request and NOT assoc, ...