diff --git a/src/network.c b/src/network.c index 572f694..21888b5 100644 --- a/src/network.c +++ b/src/network.c @@ -328,9 +328,11 @@ struct ipc_error fd_switching_read (struct ipc_event *event, struct ipc_ctx *ctx // 1. put the message in the list to be sent m.fd = dest_fd; ipc_write (ctx, &m); - // 2. set event IPC_EVENT_TYPE_SWITCH, inform ipcd of a successful reception. + // 2. delete the message (a deep copy has been made) + ipc_message_empty (&m); + // 3. set event IPC_EVENT_TYPE_SWITCH, inform ipcd of a successful reception. IPC_EVENT_SET (event, IPC_EVENT_TYPE_SWITCH, index, ctx->pollfd[index].fd, NULL); - // 3. IPC_RETURN_NO_ERROR + // 4. IPC_RETURN_NO_ERROR IPC_RETURN_NO_ERROR; }