diff options
author | hasso <hasso> | 2004-09-13 14:01:12 +0000 |
---|---|---|
committer | hasso <hasso> | 2004-09-13 14:01:12 +0000 |
commit | 9428f2dc4e577827db666d2643a1781ebecf044c (patch) | |
tree | 4deb0ca5b72e82828085f57088c4958b3ca21119 /ospf6d/ospf6_route.c | |
parent | b5f310cb9f78b140f1c747148cad6889133597fc (diff) | |
download | quagga-9428f2dc4e577827db666d2643a1781ebecf044c.tar.bz2 quagga-9428f2dc4e577827db666d2643a1781ebecf044c.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 * |