diff --git a/src/cntlr.c b/src/cntlr.c index e9a54ce57cf34fcd86bb5d1ada59a49dc8fe87ab..c9a5af95d639acc74722f1b7b0ac1f60aa66f2e6 100644 --- a/src/cntlr.c +++ b/src/cntlr.c @@ -1231,6 +1231,9 @@ static void forall_node_get_sta_metrics(struct controller *c) list_for_each_entry(n, &c->nodelist, list) { struct sta *s = NULL; + if (!n->sta_count || list_empty(&n->stalist)) + continue; + list_for_each_entry(s, &n->stalist, list) { struct cmdu_buff *cmdu; @@ -2232,7 +2235,6 @@ static void cntlr_metric_collection(struct controller *c) forall_node_get_sta_metrics(c); - /* TODO: */ //forall_node_get_usta_metrics(c); diff --git a/src/cntlr_map.c b/src/cntlr_map.c index 603e7dd24c276272dc34f3e4ee93473735d4fdad..aef3dc559cab9b714619a755485d937a740a0428 100644 --- a/src/cntlr_map.c +++ b/src/cntlr_map.c @@ -4442,7 +4442,7 @@ int cntlr_handle_map_event(void *module, uint16_t cmdutype, uint16_t mid, return -1; } - /*update the timestamp of the node*/ + /* update the timestamp of the node */ if (n) timestamp_update(&n->last_tsp_seen);