From cc90c54b36818a13774edfed8d7ac9a6e36c9373 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Thu, 23 Nov 2023 15:18:44 +0100 Subject: *: add `zclient_options_sync` ... and use it instead of fiddling with the `.synchronous` field. (Make it const while at it.) Signed-off-by: David Lamparter --- pathd/path_zebra.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'pathd') diff --git a/pathd/path_zebra.c b/pathd/path_zebra.c index 826443f97..645fa5085 100644 --- a/pathd/path_zebra.c +++ b/pathd/path_zebra.c @@ -320,9 +320,6 @@ static zclient_handler *const path_handlers[] = { */ void path_zebra_init(struct event_loop *master) { - struct zclient_options options = zclient_options_default; - options.synchronous = true; - /* Initialize asynchronous zclient. */ zclient = zclient_new(master, &zclient_options_default, path_handlers, array_size(path_handlers)); @@ -330,7 +327,7 @@ void path_zebra_init(struct event_loop *master) zclient->zebra_connected = path_zebra_connected; /* Initialize special zclient for synchronous message exchanges. */ - zclient_sync = zclient_new(master, &options, NULL, 0); + zclient_sync = zclient_new(master, &zclient_options_sync, NULL, 0); zclient_sync->sock = -1; zclient_sync->redist_default = ZEBRA_ROUTE_SRTE; zclient_sync->instance = 1; -- cgit v1.2.3