summaryrefslogtreecommitdiffstats
path: root/hcid/manager.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-09-26 13:56:30 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-09-26 13:56:30 +0000
commit90e08a3db079ce84c9f49f46c48ef7c4b757a2e4 (patch)
treeddf08d70b537fa11338064a7896c3f8754403632 /hcid/manager.c
parent09200aea99bdd29fb0f75b67162fbd958ef5df99 (diff)
Protect ActivateService against executing a service twice if it is currently starting up
Diffstat (limited to 'hcid/manager.c')
-rw-r--r--hcid/manager.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hcid/manager.c b/hcid/manager.c
index 8e0652cc..fa4e8eb1 100644
--- a/hcid/manager.c
+++ b/hcid/manager.c
@@ -285,6 +285,9 @@ static DBusHandlerResult activate_service(DBusConnection *conn,
return send_message_and_unref(conn, reply);
}
+ if (service->pid)
+ return error_service_start_in_progress(conn, msg);
+
if (service_start(service, conn) < 0)
return error_failed(conn, msg, ENOEXEC);