mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
Fix loading metric
This commit is contained in:
parent
9280a2db85
commit
43f8d8af12
5 changed files with 15 additions and 15 deletions
|
|
@ -47,7 +47,7 @@ struct probe_metric_s uci_get_dawn_metric()
|
|||
ret.no_ht_support = atoi(ptr.o->v.string);
|
||||
|
||||
char tmp_no_vht_support[] = "dawn.metric.no_vht_support";
|
||||
if (uci_lookup_ptr (c, &ptr, tmp_vht_support, 1) != UCI_OK) {
|
||||
if (uci_lookup_ptr (c, &ptr, tmp_no_vht_support, 1) != UCI_OK) {
|
||||
uci_perror(c, "uci_get_daw_metric Error");
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -70,14 +70,13 @@ struct probe_metric_s uci_get_dawn_metric()
|
|||
if(ptr.o->type == UCI_TYPE_STRING)
|
||||
ret.freq = atoi(ptr.o->v.string);
|
||||
|
||||
char tmp_freq[] = "dawn.metric.chan_util";
|
||||
if (uci_lookup_ptr (c, &ptr, tmp_freq, 1) != UCI_OK) {
|
||||
char tmp_util[] = "dawn.metric.chan_util";
|
||||
if (uci_lookup_ptr (c, &ptr, tmp_util, 1) != UCI_OK) {
|
||||
uci_perror(c, "uci_get_daw_metric Error");
|
||||
return ret;
|
||||
}
|
||||
if(ptr.o->type == UCI_TYPE_STRING)
|
||||
ret.freq = atoi(ptr.o->v.string);
|
||||
|
||||
ret.chan_util = atoi(ptr.o->v.string);
|
||||
|
||||
uci_free_context (c);
|
||||
|
||||
|
|
|
|||
|
|
@ -140,10 +140,10 @@ static int decide_function(probe_entry *prob_req) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*if(better_ap_available(prob_req->bssid_addr, prob_req->client_addr))
|
||||
if(better_ap_available(prob_req->bssid_addr, prob_req->client_addr))
|
||||
{
|
||||
return 0;
|
||||
}*/
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -217,7 +217,7 @@ int parse_to_probe_req(struct blob_attr *msg, probe_entry *prob_req) {
|
|||
|
||||
static int handle_auth_req(struct blob_attr *msg) {
|
||||
|
||||
print_array();
|
||||
//print_array();
|
||||
auth_entry auth_req;
|
||||
parse_to_auth_req(msg, &auth_req);
|
||||
printf("AUTH Entry: ");
|
||||
|
|
@ -472,8 +472,6 @@ int parse_to_clients(struct blob_attr *msg, int do_kick, uint32_t id) {
|
|||
|
||||
static void ubus_get_clients_cb(struct ubus_request *req, int type, struct blob_attr *msg) {
|
||||
|
||||
//printf("[GET CLIENTS] Peer: %08x \n", req->peer);
|
||||
|
||||
if (!msg)
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue