Use the send recv proc helper in the stratifier process

This commit is contained in:
Con Kolivas 2014-04-22 11:49:13 +10:00
parent 1953cd2935
commit bbd4e59069

View File

@ -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);
}