Skip to content
Snippets Groups Projects
Commit f733e8dc authored by Nevadita's avatar Nevadita Committed by Anjan Chanda
Browse files

Fixed few cases

parent d77996ab
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment