summaryrefslogtreecommitdiffstats
path: root/ospf6d
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2015-09-24 09:25:19 -0400
committerPaul Jakma <paul@quagga.net>2015-10-27 10:53:21 +0000
commit7125293d65d73a451ec203c8c1630c236171f5a3 (patch)
treef9d118c9a8f8374d69fb9c75c87531a2ca478fb2 /ospf6d
parentfd1c1a133af47ae5533a5ed41b73ff62e7aa1058 (diff)
downloadquagga-7125293d65d73a451ec203c8c1630c236171f5a3.tar.bz2
quagga-7125293d65d73a451ec203c8c1630c236171f5a3.tar.xz
lib: zclient.c remove extern struct thread_master *
zclient.c depended upon link time inclusion of a extern struct thread_master *master. This is a violation of the namespace of the calling daemon. If a library needs the pointer pass it in and save it for future use. This code change also makes the zclient code consistent with the other lib functions that need to schedule work on your behalf Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'ospf6d')
-rw-r--r--ospf6d/ospf6_zebra.c4
-rw-r--r--ospf6d/ospf6_zebra.h2
-rw-r--r--ospf6d/ospf6d.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c
index 951e11d2..d37e5089 100644
--- a/ospf6d/ospf6_zebra.c
+++ b/ospf6d/ospf6_zebra.c
@@ -578,10 +578,10 @@ ospf6_zebra_connected (struct zclient *zclient)
}
void
-ospf6_zebra_init (void)
+ospf6_zebra_init (struct thread_master *master)
{
/* Allocate zebra structure. */
- zclient = zclient_new ();
+ zclient = zclient_new (master);
zclient_init (zclient, ZEBRA_ROUTE_OSPF6);
zclient->zebra_connected = ospf6_zebra_connected;
zclient->router_id_update = ospf6_router_id_update_zebra;
diff --git a/ospf6d/ospf6_zebra.h b/ospf6d/ospf6_zebra.h
index a219450e..05694d39 100644
--- a/ospf6d/ospf6_zebra.h
+++ b/ospf6d/ospf6_zebra.h
@@ -44,7 +44,7 @@ extern void ospf6_zebra_redistribute (int);
extern void ospf6_zebra_no_redistribute (int);
#define ospf6_zebra_is_redistribute(type) \
vrf_bitmap_check (zclient->redist[type], VRF_DEFAULT)
-extern void ospf6_zebra_init (void);
+extern void ospf6_zebra_init(struct thread_master *);
extern int config_write_ospf6_debug_zebra (struct vty *vty);
extern void install_element_ospf6_debug_zebra (void);
diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c
index 3cdd5c11..c2baa314 100644
--- a/ospf6d/ospf6d.c
+++ b/ospf6d/ospf6d.c
@@ -1764,7 +1764,7 @@ ospf6_init (void)
ospf6_area_init ();
ospf6_interface_init ();
ospf6_neighbor_init ();
- ospf6_zebra_init ();
+ ospf6_zebra_init (master);
ospf6_lsa_init ();
ospf6_spf_init ();