summaryrefslogtreecommitdiffstats
path: root/proto/pipe
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-01-16 17:44:50 +0100
committerMartin Mares <mj@ucw.cz>2000-01-16 17:44:50 +0100
commit50fe90edf3deab409ea7887c131bfe6ce89fa556 (patch)
treed9aad4ed34285a59cfcc0286a22ca5ccdb63a82f /proto/pipe
parent394aec8fdd112a81da1e2f6f0e09ee74256dc24e (diff)
downloadbird-50fe90edf3deab409ea7887c131bfe6ce89fa556.tar
bird-50fe90edf3deab409ea7887c131bfe6ce89fa556.zip
First attempt on dynamic reconfiguration. There are still lots of bugs
and problems to solve, but the hardest part works.
Diffstat (limited to 'proto/pipe')
-rw-r--r--proto/pipe/pipe.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/proto/pipe/pipe.c b/proto/pipe/pipe.c
index 0612f5f..c6a8317 100644
--- a/proto/pipe/pipe.c
+++ b/proto/pipe/pipe.c
@@ -1,7 +1,7 @@
/*
* BIRD -- Table-to-Table Routing Protocol a.k.a Pipe
*
- * (c) 1999 Martin Mares <mj@ucw.cz>
+ * (c) 1999--2000 Martin Mares <mj@ucw.cz>
*
* Can be freely distributed and used under the terms of the GNU GPL.
*/
@@ -106,10 +106,20 @@ pipe_start(struct proto *P)
*/
a = proto_add_announce_hook(P, p->peer);
a->proto = &ph->p;
+ rt_lock_table(p->peer);
return PS_UP;
}
+static int
+pipe_shutdown(struct proto *P)
+{
+ struct pipe_proto *p = (struct pipe_proto *) P;
+
+ rt_unlock_table(p->peer);
+ return PS_DOWN;
+}
+
static struct proto *
pipe_init(struct proto_config *C)
{
@@ -147,5 +157,6 @@ struct protocol proto_pipe = {
postconfig: pipe_postconfig,
init: pipe_init,
start: pipe_start,
+ shutdown: pipe_shutdown,
get_status: pipe_get_status,
};