diff --git a/src/cntlr_map.c b/src/cntlr_map.c index 5888d6fe7d6ccc645f432949a4df0c6dd0d5e416..4d6decc8f5b40147f317d674e3e0dea09d749f35 100644 --- a/src/cntlr_map.c +++ b/src/cntlr_map.c @@ -325,20 +325,16 @@ int handle_topology_response(void *cntlr, struct cmdu_buff *cmdu, struct node *n (struct tlv_device_info *)tv[0][0]->data; bool new_bh_topo_dev = false; - dbg("%s: Device Info TLV from " MACFMT "\n", __func__, - MAC2STR(cmdu->origin)); + dbg("%s: Device Info TLV from " MACFMT "\n", __func__, MAC2STR(cmdu->origin)); - bh_topo_dev = - find_bh_topology_device(tlv_dev_info->aladdr); + bh_topo_dev = find_bh_topology_device(tlv_dev_info->aladdr); if (!bh_topo_dev) { dbg("%s: New bh_topology_device\n", __func__); - bh_topo_dev = add_bh_topology_device( - tlv_dev_info->aladdr); + bh_topo_dev = add_bh_topology_device(tlv_dev_info->aladdr); if (!bh_topo_dev) { - err("%s: Error in memory alloc\n", - __func__); + err("%s: Error in memory alloc\n", __func__); return -1; } @@ -348,21 +344,17 @@ int handle_topology_response(void *cntlr, struct cmdu_buff *cmdu, struct node *n set_bh_toplogy_response_timestamp(bh_topo_dev); if (new_bh_topo_dev || - has_interface_info_changed(tlv_dev_info, - bh_topo_dev)) { - dbg("%s: New interface info for bh_topology_device\n", - __func__); + has_interface_info_changed(tlv_dev_info, bh_topo_dev)) { + + dbg("%s: New interface info for bh_topology_device\n", __func__); /* Copy new info and invalidate the model. */ - copy_interface_info_from_tlv(tlv_dev_info, - bh_topo_dev); + copy_interface_info_from_tlv(tlv_dev_info, bh_topo_dev); } - } if (!bh_topo_dev) { - err("%s: 1905 dev.info is missing. Logical error in\n", - __func__); + err("%s: 1905 dev.info is missing. Logical error in\n", __func__); return -1; } @@ -372,19 +364,17 @@ int handle_topology_response(void *cntlr, struct cmdu_buff *cmdu, struct node *n neighbor_tlvs[neigh_tlv_cnt] = (struct tlv_1905neighbor *)tv[3][neigh_tlv_cnt]->data; - tlv_lengths[neigh_tlv_cnt] = - tlv_length(tv[3][neigh_tlv_cnt]); + tlv_lengths[neigh_tlv_cnt] = tlv_length(tv[3][neigh_tlv_cnt]); ++neigh_tlv_cnt; } if (has_neighbor_info_changed(neighbor_tlvs, tlv_lengths, neigh_tlv_cnt, bh_topo_dev)) { - dbg("%s: New neighbor info for bh_topology_device\n", - __func__); + dbg("%s: New neighbor info for bh_topology_device\n", __func__); /* Copy new info and invalidate the model. */ copy_neighbor_info_from_tlvs(neighbor_tlvs, tlv_lengths, - neigh_tlv_cnt, bh_topo_dev); + neigh_tlv_cnt, bh_topo_dev); } if (tv[7][0]) {