Skip to content

Commit

Permalink
1)Changing the order of the 2 STOPPED events. 2)Changing 'if(' to 'if ('
Browse files Browse the repository at this point in the history
  • Loading branch information
skyadiddee authored and goruklu committed Oct 5, 2023
1 parent 4c3df65 commit dd77b73
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions daemon/lib/source/Dobby.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1856,24 +1856,25 @@ void Dobby::onContainerStopped(int32_t cd, const ContainerId& id, int status)
// Regardless of whether of the not the hooks executed successfully
// we fire off a notification event indicating that the container
// has stopped.

// Fire off a notification with status
if (!mIpcService->emitSignal(AI_IPC::Signal(mObjectPath,
DOBBY_CTRL_INTERFACE,
DOBBY_CTRL_EVENT_STOPPED),
{ cd, id.str() }))
DOBBY_CTRL_EVENT_STOPPED_WITH_STATUS),
{ cd, id.str(), int32_t(status) }))
{
AI_LOG_ERROR("failed to emit '%s' signal",
DOBBY_CTRL_EVENT_STOPPED);
DOBBY_CTRL_EVENT_STOPPED_WITH_STATUS);
}


//Fire off a notification with status
if(!mIpcService->emitSignal(AI_IPC::Signal(mObjectPath,
//Fire off a normal notification
if (!mIpcService->emitSignal(AI_IPC::Signal(mObjectPath,
DOBBY_CTRL_INTERFACE,
DOBBY_CTRL_EVENT_STOPPED_WITH_STATUS),
{ cd, id.str(), int32_t(status) }))
DOBBY_CTRL_EVENT_STOPPED),
{ cd, id.str() }))
{
AI_LOG_ERROR("failed to emit '%s' signal",
DOBBY_CTRL_EVENT_STOPPED_WITH_STATUS);
DOBBY_CTRL_EVENT_STOPPED);
}

AI_LOG_MILESTONE("container '%s'(%d) stopped (status 0x%04x)", id.c_str(),
Expand Down

0 comments on commit dd77b73

Please sign in to comment.