From 50fe90edf3deab409ea7887c131bfe6ce89fa556 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 16 Jan 2000 16:44:50 +0000 Subject: First attempt on dynamic reconfiguration. There are still lots of bugs and problems to solve, but the hardest part works. --- proto/pipe/pipe.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'proto/pipe/pipe.c') 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 + * (c) 1999--2000 Martin Mares * * 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, }; -- cgit v1.2.3