From cbb0a440e9e71ec65a784a2ce00abdcba6fff010 Mon Sep 17 00:00:00 2001 From: Pin Date: Sat, 2 Mar 2024 23:54:37 -0500 Subject: [PATCH] zmsg_send changes --- guestfs-inspectd.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/guestfs-inspectd.c b/guestfs-inspectd.c index cf446d7..b338268 100644 --- a/guestfs-inspectd.c +++ b/guestfs-inspectd.c @@ -89,7 +89,7 @@ static void *worker_task(zsock_t *pipe, char *disk_path) { zsock_signal(pipe, 0); while (true) { zmsg_t *message = zmsg_recv(pipe); - if (message == NULL) { + if (!message) { break; } // Process message @@ -97,10 +97,8 @@ static void *worker_task(zsock_t *pipe, char *disk_path) { // do something here // Sending reply - zmsg_t *reply = zmsg_new(); - zmsg_addstr(reply, "Reply from worker"); - zmsg_send(&reply, pipe); - zmsg_destroy(&message); + zmsg_send(&msg, pipe); + zmsg_destory(&msg); } /*if (guestfs_is_file_opts(g, file_path, GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) { printf("--- %s ---\n", file_path);