From 539e5e7671edcf5d0a36a06942f11605d4b6da4a Mon Sep 17 00:00:00 2001 From: PolynomialDivision Date: Wed, 7 Feb 2018 13:28:38 +0100 Subject: [PATCH] add debug msgs --- src/include/datastorage.h | 1 + src/utils/ubus.c | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/include/datastorage.h b/src/include/datastorage.h index f8331b0..843e32e 100644 --- a/src/include/datastorage.h +++ b/src/include/datastorage.h @@ -107,6 +107,7 @@ typedef struct probe_entry_s { int counter; int deny_counter; uint8_t max_supp_datarate; + uint8_t min_supp_datarate; } probe_entry; typedef struct auth_entry_s { diff --git a/src/utils/ubus.c b/src/utils/ubus.c index 69c544b..ebc3c09 100644 --- a/src/utils/ubus.c +++ b/src/utils/ubus.c @@ -417,7 +417,6 @@ int parse_to_probe_req(struct blob_attr *msg, probe_entry *prob_req) { __blob_for_each_attr(attr, data, len) { uint8_t tmp_rate = (uint8_t)blobmsg_get_u32(attr); - printf("TMP Supported Rate is: %d\n", tmp_rate); max_rate = tmp_rate > max_rate ? tmp_rate : max_rate; min_rate = tmp_rate < min_rate ? tmp_rate : min_rate; } @@ -430,13 +429,15 @@ int parse_to_probe_req(struct blob_attr *msg, probe_entry *prob_req) { __blob_for_each_attr(attr, blobmsg_data(tb[PROB_SUPP_RATES]), len) { uint8_t tmp_rate = (uint8_t)blobmsg_get_u32(attr); - printf("TMP Supported Rate is: %d\n", tmp_rate); max_rate = tmp_rate > max_rate ? tmp_rate : max_rate; min_rate = tmp_rate < min_rate ? tmp_rate : min_rate; } } printf("MAX Supported Rate is: %d\n", max_rate); printf("Min Supported Rate is: %d\n", min_rate); + prob_req->max_supp_datarate = max_rate; + prob_req->min_supp_datarate = min_rate; + return 0; } @@ -860,6 +861,9 @@ dump_client_table(struct blob_attr *head, int len, const char *bssid_addr, uint3 } int parse_to_clients(struct blob_attr *msg, int do_kick, uint32_t id) { + + printf("PARSING TO CLIENTS!\n"); + struct blob_attr *tb[__CLIENT_TABLE_MAX]; if (!msg) { @@ -909,6 +913,7 @@ int parse_to_clients(struct blob_attr *msg, int do_kick, uint32_t id) { ap_entry.station_count = 0; } + printf("INSERTING TO AP ARRAY!\n"); insert_to_ap_array(ap_entry); if (do_kick) {