From bbd4e5906988d3934e698b28327959f382af9d33 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 22 Apr 2014 11:49:13 +1000 Subject: [PATCH] Use the send recv proc helper in the stratifier process --- src/stratifier.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/stratifier.c b/src/stratifier.c index 3a6a55ce..3d50881e 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -19,20 +19,9 @@ static void update_base(ckpool_t *ckp) { - char *path = ckp->generator.us.path, *buf; - int genfd; + char *buf; - genfd = open_unix_client(ckp->generator.us.path); - if (genfd < 0) { - LOGWARNING("Failed to open generator socket %s", path); - return; - } - if (!send_unix_msg(genfd, "getbase")) { - LOGWARNING("Failed to send getbase to generator socket"); - close(genfd); - return; - } - buf = recv_unix_msg(genfd); + buf = send_recv_proc(&ckp->generator, "getbase"); /* Do something with this buffer here */ dealloc(buf); }