launch_daemon: Fixed resetting launch status, port update.
* _SetLaunchStatus() doesn't allow to set the status to B_NO_INIT (and rightly so). * Therefore, we now reset it manually in Job::TeamDeleted(). This fixes restarting things that once ran on demand. * Also update the port message when the default port changes.
This commit is contained in:
parent
190df86bd4
commit
93bb55e413
@ -313,6 +313,16 @@ void
|
||||
Job::SetDefaultPort(port_id port)
|
||||
{
|
||||
fDefaultPort = port;
|
||||
|
||||
PortMap::iterator iterator = fPortMap.begin();
|
||||
for (; iterator != fPortMap.end(); iterator++) {
|
||||
BString name;
|
||||
if (iterator->second.HasString("name"))
|
||||
continue;
|
||||
|
||||
iterator->second.SetInt32("port", (int32)port);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -396,7 +406,8 @@ Job::TeamDeleted()
|
||||
if (IsService())
|
||||
SetState(B_JOB_STATE_WAITING_TO_RUN);
|
||||
|
||||
_SetLaunchStatus(B_NO_INIT);
|
||||
MutexLocker locker(fLaunchStatusLock);
|
||||
fLaunchStatus = B_NO_INIT;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user