zmsg_send changes
This commit is contained in:
@@ -89,7 +89,7 @@ static void *worker_task(zsock_t *pipe, char *disk_path) {
|
|||||||
zsock_signal(pipe, 0);
|
zsock_signal(pipe, 0);
|
||||||
while (true) {
|
while (true) {
|
||||||
zmsg_t *message = zmsg_recv(pipe);
|
zmsg_t *message = zmsg_recv(pipe);
|
||||||
if (message == NULL) {
|
if (!message) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Process message
|
// Process message
|
||||||
@@ -97,10 +97,8 @@ static void *worker_task(zsock_t *pipe, char *disk_path) {
|
|||||||
// do something here
|
// do something here
|
||||||
|
|
||||||
// Sending reply
|
// Sending reply
|
||||||
zmsg_t *reply = zmsg_new();
|
zmsg_send(&msg, pipe);
|
||||||
zmsg_addstr(reply, "Reply from worker");
|
zmsg_destory(&msg);
|
||||||
zmsg_send(&reply, pipe);
|
|
||||||
zmsg_destroy(&message);
|
|
||||||
}
|
}
|
||||||
/*if (guestfs_is_file_opts(g, file_path, GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) {
|
/*if (guestfs_is_file_opts(g, file_path, GUESTFS_IS_FILE_OPTS_FOLLOWSYMLINKS, 1, -1) > 0) {
|
||||||
printf("--- %s ---\n", file_path);
|
printf("--- %s ---\n", file_path);
|
||||||
|
|||||||
Reference in New Issue
Block a user