summaryrefslogtreecommitdiffstats
path: root/bgpd/rfapi/rfapi_rib.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2020-10-14 18:44:23 +0200
committerDonald Sharp <sharpd@nvidia.com>2020-10-17 19:39:10 +0200
commitc10e14e96dae32a3b52bc97ab197e58577cff709 (patch)
treeaf3db68b477518fdd84ce4cbf4cd6d7b4823011c /bgpd/rfapi/rfapi_rib.c
parentMerge pull request #7336 from donaldsharp/sharp_one_one (diff)
downloadfrr-c10e14e96dae32a3b52bc97ab197e58577cff709.tar.xz
frr-c10e14e96dae32a3b52bc97ab197e58577cff709.zip
*: Create/Use accessor functions for lock count
Create appropriate accessor functions for the rn->lock data. We should be accessing this data through accessor functions since it is private data to the data structure. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/rfapi/rfapi_rib.c')
-rw-r--r--bgpd/rfapi/rfapi_rib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bgpd/rfapi/rfapi_rib.c b/bgpd/rfapi/rfapi_rib.c
index e068eb7af..8109e7e3d 100644
--- a/bgpd/rfapi/rfapi_rib.c
+++ b/bgpd/rfapi/rfapi_rib.c
@@ -802,7 +802,7 @@ int rfapiRibPreloadBi(
*/
trn = agg_node_get(rfd->rsp_times[afi], p); /* locks trn */
trn->info = (void *)(uintptr_t)bgp_clock();
- if (trn->lock > 1)
+ if (agg_node_get_lock_count(trn) > 1)
agg_unlock_node(trn);
return 0;
@@ -1242,7 +1242,7 @@ callback:
trn = agg_node_get(rfd->rsp_times[afi],
p); /* locks trn */
trn->info = (void *)(uintptr_t)bgp_clock();
- if (trn->lock > 1)
+ if (agg_node_get_lock_count(trn) > 1)
agg_unlock_node(trn);
rfapiRfapiIpAddr2Str(&new->vn_address, buf, BUFSIZ);
@@ -1833,7 +1833,7 @@ int rfapiRibFTDFilterRecentPrefix(
*/
trn = agg_node_get(rfd->rsp_times[afi], p); /* locks trn */
prefix_time = (time_t)trn->info;
- if (trn->lock > 1)
+ if (agg_node_get_lock_count(trn) > 1)
agg_unlock_node(trn);
#ifdef DEBUG_FTD_FILTER_RECENT
@@ -2069,7 +2069,7 @@ rfapiRibPreload(struct bgp *bgp, struct rfapi_descriptor *rfd,
*/
trn = agg_node_get(rfd->rsp_times[afi], &pfx); /* locks trn */
trn->info = (void *)(uintptr_t)bgp_clock();
- if (trn->lock > 1)
+ if (agg_node_get_lock_count(trn) > 1)
agg_unlock_node(trn);
{