diff --git a/src/storage/datastorage.c b/src/storage/datastorage.c index 936f652..c8eda89 100644 --- a/src/storage/datastorage.c +++ b/src/storage/datastorage.c @@ -71,9 +71,9 @@ int eval_probe_metric(struct probe_entry_s probe_entry) { // check if ap entry is available if (mac_is_equal(ap_entry.bssid_addr, probe_entry.bssid_addr)) { - score += probe_entry.ht_support ? dawn_metric.ht_support : 0; + score += probe_entry.ht_support && ap_entry.ht ? dawn_metric.ht_support : 0; score += !probe_entry.ht_support && !ap_entry.ht ? dawn_metric.no_ht_support : 0; - score += probe_entry.vht_support ? dawn_metric.vht_support : 0; + score += probe_entry.vht_support && ap_entry.vht ? dawn_metric.vht_support : 0; score += !probe_entry.vht_support && !ap_entry.vht ? dawn_metric.no_vht_support : 0; score += ap_entry.channel_utilization <= dawn_metric.max_chan_util ? dawn_metric.chan_util : 0; } diff --git a/src/utils/ubus.c b/src/utils/ubus.c index 42f5573..33e7488 100644 --- a/src/utils/ubus.c +++ b/src/utils/ubus.c @@ -377,7 +377,7 @@ static int add_subscriber(char *name) { fprintf(stderr, "Failed to look up test object for %s\n", name); return -1; } - + if(hostapd_array_check_id(id)) { return 0;