From f733e8dc43ca9745b11f1dd2baf584d45d345538 Mon Sep 17 00:00:00 2001 From: "nevadita.chatterjee" <nevadita.chatterjee@iopsys.eu> Date: Tue, 28 Jul 2020 19:42:56 +0530 Subject: [PATCH] Fixed few cases --- src/config.c | 2 +- src/topologyd.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/config.c b/src/config.c index 1b11f35..3eb60d9 100644 --- a/src/config.c +++ b/src/config.c @@ -47,7 +47,7 @@ int topologyd_config_defaults(struct topologyd_config *cfg) if (!cfg) return -1; - cfg->enabled = false; + cfg->enabled = true; cfg->depth = TOPOLOGY_DEPTH; cfg->refresh_int = TOPOLOGY_REFRESH_INT; cfg->maxlog = TOPOLOGY_LOG_MAX; diff --git a/src/topologyd.c b/src/topologyd.c index 6ebad98..f1cd507 100644 --- a/src/topologyd.c +++ b/src/topologyd.c @@ -55,6 +55,7 @@ static void ieee1905_info_response_cb(struct ubus_request *req, mac_str = _json_obj_get_string(jroot, "ieee1905id"); if (mac_str) { hwaddr_aton(mac_str, p->ieee1905_macaddr); + hwaddr_aton(mac_str, p->selfnode.hwaddr); free(mac_str); } @@ -89,7 +90,7 @@ int topologyd_send_ieee1905_topology_query(struct topologyd_private *p, blob_buf_init(&bb, 0); if (dest) { hwaddr_ntoa(dest, dest_macstr); - blobmsg_add_string(&bb, "remote_mac", dest_macstr); + blobmsg_add_string(&bb, "dst_macaddr", dest_macstr); } ret = ubus_invoke(p->ctx, p->ieee1905, "query_topology", bb.head, @@ -412,6 +413,9 @@ static int topologyd_run(struct topologyd_private *priv) return -1; } + if(priv->refresh_int == 0) + priv->refresh_int = TOPOLOGY_REFRESH_INT; + topologyd_start_heartbeat(&priv->heartbeat); topologyd_periodic_refresh(&priv->refresh_timer); -- GitLab