diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-09-23 13:26:56 -0700 | 
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-09-23 13:26:56 -0700 | 
| commit | 4140ca4d153e8949afd6abc9e00fbbac3d47799c (patch) | |
| tree | e21a92656dd140a433ce626128fc89801ef926a2 /babeld/babel_zebra.c | |
| parent | c006e89e9ae894f5e078cc53146e09225b53cc6f (diff) | |
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 'babeld/babel_zebra.c')
| -rw-r--r-- | babeld/babel_zebra.c | 7 | 
1 files changed, 2 insertions, 5 deletions
diff --git a/babeld/babel_zebra.c b/babeld/babel_zebra.c index c7236d3201..e107cca100 100644 --- a/babeld/babel_zebra.c +++ b/babeld/babel_zebra.c @@ -48,9 +48,6 @@ THE SOFTWARE.  #include "xroute.h"  #include "util.h" -void babelz_zebra_init(void); - -  /* we must use a pointer because of zclient.c's functions (new, free). */  struct zclient *zclient;  static int zebra_config_write (struct vty *vty); @@ -341,9 +338,9 @@ debug_babel_config_write (struct vty * vty)  #endif /* NO_DEBUG */  } -void babelz_zebra_init(void) +void babelz_zebra_init (struct thread_master *master)  { -    zclient = zclient_new(); +    zclient = zclient_new(master);      zclient_init(zclient, ZEBRA_ROUTE_BABEL, 0);      zclient->interface_add = babel_interface_add;  | 
