mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
Fix Nullpointer in dawn init
This commit is contained in:
parent
81ecf9d161
commit
e4c5feb40e
3 changed files with 8 additions and 3 deletions
|
@ -20,4 +20,4 @@ config settings metric
|
|||
option chan_util '0'
|
||||
option max_chan_util '100'
|
||||
option min_rssi '-60'
|
||||
option min_probe_count '5'
|
||||
option min_probe_count '5'
|
||||
|
|
|
@ -13,4 +13,7 @@ int send_string_enc(char *msg);
|
|||
|
||||
void close_socket();
|
||||
|
||||
// save connections
|
||||
// struct sockaddr_in addr[100];
|
||||
|
||||
#endif
|
||||
|
|
|
@ -94,7 +94,9 @@ struct probe_metric_s uci_get_dawn_metric()
|
|||
if(ptr.o->type == UCI_TYPE_STRING)
|
||||
ret.max_chan_util = atoi(ptr.o->v.string);
|
||||
|
||||
char tmp_min_probe_count[] = "dawn.min_probe_count";
|
||||
|
||||
printf("Try to load min_probe_count\n");
|
||||
char tmp_min_probe_count[] = "dawn.metric.min_probe_count";
|
||||
if (uci_lookup_ptr (c, &ptr, tmp_min_probe_count, 1) != UCI_OK) {
|
||||
uci_perror(c, "uci_get_daw_metric Error");
|
||||
return ret;
|
||||
|
@ -104,7 +106,7 @@ struct probe_metric_s uci_get_dawn_metric()
|
|||
|
||||
printf("Loaded metric: %d\n", ret.min_probe_count);
|
||||
|
||||
uci_free_context (c);
|
||||
uci_free_context(c);
|
||||
|
||||
return ret;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue