[command] Only execute "bottom half" function if main command function

returns 0
This commit is contained in:
chme 2016-10-23 08:12:47 +02:00
parent 2f8c061c11
commit 16149d5c61
1 changed files with 4 additions and 0 deletions

View File

@ -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