waiter: modernize the waiter interface
[lttng-tools.git] / src / bin / lttng-sessiond / notification-thread-events.cpp
index f18bc68d44760c969b01c347500c90214c201982..70774a97530b1b625033387c2215ab052e47bf54 100644 (file)
@@ -3311,21 +3311,24 @@ int handle_notification_thread_command(struct notification_thread_handle *handle
        if (ret) {
                goto error_unlock;
        }
+
 end:
        if (cmd->is_async) {
-               free(cmd);
+               delete cmd;
                cmd = nullptr;
        } else {
-               lttng_waiter_wake(&cmd->reply_waiter);
+               cmd->command_completed_waker->wake();
        }
+
        return ret;
+
 error_unlock:
        /* Wake-up and return a fatal error to the calling thread. */
-       lttng_waiter_wake(&cmd->reply_waiter);
        cmd->reply_code = LTTNG_ERR_FATAL;
+
 error:
-       /* Indicate a fatal error to the caller. */
-       return -1;
+       ret = -1;
+       goto end;
 }
 
 static int socket_set_non_blocking(int socket)
This page took 0.023344 seconds and 4 git commands to generate.