From ebe32f70f13e9024fc4615fa8cebe0356449a49a Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 26 May 2016 20:11:15 -0400 Subject: [PATCH] lib: Fixup zclient api to be consistent All ZAPI commands pass the zclient around not the individual stream we need. Switch code over to follow conventions. Signed-off-by: Donald Sharp --- lib/zclient.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/zclient.c b/lib/zclient.c index 9f426f1cac..4fe5398e65 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -971,13 +971,13 @@ zebra_router_id_update_read (struct stream *s, struct prefix *rid) */ static void -zclient_vrf_add (struct stream *s, vrf_id_t vrf_id) +zclient_vrf_add (struct zclient *zclient, vrf_id_t vrf_id) { struct vrf *vrf; char vrfname_tmp[VRF_NAMSIZ]; /* Read interface name. */ - stream_get (vrfname_tmp, s, VRF_NAMSIZ); + stream_get (vrfname_tmp, zclient->ibuf, VRF_NAMSIZ); /* Lookup/create vrf by vrf_id. */ vrf = vrf_get (vrf_id, vrfname_tmp); @@ -986,7 +986,7 @@ zclient_vrf_add (struct stream *s, vrf_id_t vrf_id) } static void -zclient_vrf_delete (struct stream *s, vrf_id_t vrf_id) +zclient_vrf_delete (struct zclient *zclient, vrf_id_t vrf_id) { struct vrf *vrf; @@ -1404,10 +1404,10 @@ zclient_read (struct thread *thread) (*zclient->router_id_update) (command, zclient, length, vrf_id); break; case ZEBRA_VRF_ADD: - zclient_vrf_add (zclient->ibuf, vrf_id); + zclient_vrf_add (zclient, vrf_id); break; case ZEBRA_VRF_DELETE: - zclient_vrf_delete (zclient->ibuf, vrf_id); + zclient_vrf_delete (zclient, vrf_id); break; case ZEBRA_INTERFACE_ADD: if (zclient->interface_add) -- 2.39.5