diff options
author | hasso <hasso> | 2004-09-13 14:01:12 +0000 |
---|---|---|
committer | hasso <hasso> | 2004-09-13 14:01:12 +0000 |
commit | fe357f93eb7008cb21aad5c783d564a64febc6b8 (patch) | |
tree | 9d7f044bc80f58d1c50ba71766ce76e3e008345f /ospf6d/ospf6_route.c | |
parent | 596b17db5a398cc8fa83d5adbe9afb7464487c78 (diff) | |
download | quagga-fe357f93eb7008cb21aad5c783d564a64febc6b8.tar.bz2 quagga-fe357f93eb7008cb21aad5c783d564a64febc6b8.tar.xz |
Merge svn revisions 997 and 1000 from Zebra cvs repository.
Diffstat (limited to 'ospf6d/ospf6_route.c')
-rw-r--r-- | ospf6d/ospf6_route.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c index b054c7b4..7a5a3941 100644 --- a/ospf6d/ospf6_route.c +++ b/ospf6d/ospf6_route.c @@ -288,6 +288,7 @@ ospf6_route_add (struct ospf6_route *route, ospf6_route_delete (route); SET_FLAG (old->flag, OSPF6_ROUTE_ADD); ospf6_route_count_assert (table); + return old; } @@ -315,10 +316,11 @@ ospf6_route_add (struct ospf6_route *route, ospf6_route_lock (route); SET_FLAG (route->flag, OSPF6_ROUTE_CHANGE); + ospf6_route_count_assert (table); + if (table->hook_add) (*table->hook_add) (route); - ospf6_route_count_assert (table); return route; } @@ -353,12 +355,12 @@ ospf6_route_add (struct ospf6_route *route, ospf6_route_lock (route); table->count++; + ospf6_route_count_assert (table); SET_FLAG (route->flag, OSPF6_ROUTE_ADD); if (table->hook_add) (*table->hook_add) (route); - ospf6_route_count_assert (table); return route; } @@ -414,12 +416,12 @@ ospf6_route_add (struct ospf6_route *route, } table->count++; + ospf6_route_count_assert (table); SET_FLAG (route->flag, OSPF6_ROUTE_ADD); if (table->hook_add) (*table->hook_add) (route); - ospf6_route_count_assert (table); return route; } @@ -470,13 +472,15 @@ ospf6_route_remove (struct ospf6_route *route, node->info = NULL; /* should unlock route_node here ? */ } + table->count--; + ospf6_route_count_assert (table); + + SET_FLAG (route->flag, OSPF6_ROUTE_WAS_REMOVED); + if (table->hook_remove) (*table->hook_remove) (route); ospf6_route_unlock (route); - table->count--; - - ospf6_route_count_assert (table); } struct ospf6_route * |