diff --git a/src/cntlr.c b/src/cntlr.c index 16c4f808033dab3cbe4f7703ee127284b9e10ddf..1c5684039a8b1fa93fe3846d12ed7cbaa005bb6d 100644 --- a/src/cntlr.c +++ b/src/cntlr.c @@ -456,6 +456,12 @@ struct node *cntlr_add_node(struct controller *c, uint8_t *almac) cntlr_sync_dyn_controller_config(c, almac); #endif +#if (EASYMESH_VERSION > 2) + if (c->cfg.qos.enabled) { + cntlr_qos_sync_node(c, n->alid); + } +#endif + return n; } @@ -1530,10 +1536,6 @@ static void cntlr_query_nodes(atimer_t *t) send_cmdu(c, cmdu); cmdu_free(cmdu); } - -#if (EASYMESH_VERSION > 2) - cntlr_qos_sync_node(c, n->alid); -#endif } timer_set(&c->query_nodes, 60 * 1000); @@ -1618,6 +1620,18 @@ bool cntlr_check_config_diff(struct controller *c, uint8_t diff) p->is_policy_diff = false; } } +#if (EASYMESH_VERSION > 2) + if ((diff & CONFIG_DIFF_QOS) && c->cfg.qos.enabled) { + struct node *n = NULL; + + trace("qos config changed\n"); + + /* send the policy config cmdu to the marked agent */ + list_for_each_entry(n, &c->nodelist, list) { + cntlr_qos_sync_node(c, n->alid); + } + } +#endif return reloaded; }