hrev49824 adds 1 changeset to branch 'master'
old head: 190df86bd455be654ae5d7531d31279258117d8b
new head: 93bb55e413778a7f44b497f84fd0ce09e23f709e
overview:
http://cgit.haiku-os.org/haiku/log/?qt=range&q=93bb55e41377+%5E190df86bd455
----------------------------------------------------------------------------
93bb55e41377: 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.
[ Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev49824
Commit: 93bb55e413778a7f44b497f84fd0ce09e23f709e
URL: http://cgit.haiku-os.org/haiku/commit/?id=93bb55e41377
Author: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
Date: Wed Nov 11 20:25:36 2015 UTC
----------------------------------------------------------------------------
1 file changed, 12 insertions(+), 1 deletion(-)
src/servers/launch/Job.cpp | 13 ++++++++++++-
----------------------------------------------------------------------------
diff --git a/src/servers/launch/Job.cpp b/src/servers/launch/Job.cpp
index 9d3c50c..b999c05 100644
--- a/src/servers/launch/Job.cpp
+++ b/src/servers/launch/Job.cpp
@@ -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;
}