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>
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index 588f0fb..cf2ea81 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -1304,10 +1304,10 @@
}
void
-ospf_zebra_init ()
+ospf_zebra_init (struct thread_master *master)
{
/* Allocate zebra structure. */
- zclient = zclient_new ();
+ zclient = zclient_new (master);
zclient_init (zclient, ZEBRA_ROUTE_OSPF);
zclient->zebra_connected = ospf_zebra_connected;
zclient->router_id_update = ospf_router_id_update_zebra;