From 7125293d65d73a451ec203c8c1630c236171f5a3 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 24 Sep 2015 09:25:19 -0400 Subject: 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 --- lib/zclient.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/zclient.h') diff --git a/lib/zclient.h b/lib/zclient.h index 3490b320..aa935c12 100644 --- a/lib/zclient.h +++ b/lib/zclient.h @@ -40,6 +40,9 @@ /* Structure for the zebra client. */ struct zclient { + /* The thread master we schedule ourselves on */ + struct thread_master *master; + /* Socket to zebra daemon. */ int sock; @@ -132,7 +135,7 @@ struct zapi_ipv4 }; /* Prototypes of zebra client service functions. */ -extern struct zclient *zclient_new (void); +extern struct zclient *zclient_new (struct thread_master *); extern void zclient_init (struct zclient *, int); extern int zclient_start (struct zclient *); extern void zclient_stop (struct zclient *); -- cgit v1.2.3