From 90e08a3db079ce84c9f49f46c48ef7c4b757a2e4 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 26 Sep 2007 13:56:30 +0000 Subject: Protect ActivateService against executing a service twice if it is currently starting up --- hcid/manager.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'hcid/manager.c') 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); -- cgit