From 16149d5c61f139e8916ce42cb7927ae94870086e Mon Sep 17 00:00:00 2001 From: chme Date: Sun, 23 Oct 2016 08:12:47 +0200 Subject: [PATCH] [command] Only execute "bottom half" function if main command function returns 0 --- src/commands.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/commands.h b/src/commands.h index f7fe21a3..9076d0f4 100644 --- a/src/commands.h +++ b/src/commands.h @@ -15,6 +15,10 @@ enum command_state { * If the function has pending events to complete, it needs to return * COMMAND_PENDING with 'ret' set to the number of pending events to wait for. * + * If the function returns with COMMAND_END, command execution will proceed + * with the "bottem half" function (if passed to the command_exec function) only + * if 'ret' is 0. + * * @param arg Opaque pointer passed by command_exec_sync or command_exec_async * @param ret Pointer to the return value for the caller of the command * @return COMMAND_END if there are no pending events (function execution is