diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-05-08 17:24:48 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-05-08 17:24:48 +0000 |
commit | 2af3c3a7ddc43577c067892cdfdc06dc4e63386c (patch) | |
tree | 6ed975fdc985e2d4c55e97f58b2d7ef124485b98 /hcid/manager.c | |
parent | e3dede624b3f622fdb176b140e057f98cf26ca2b (diff) |
Remove service daemon activation handling
Diffstat (limited to 'hcid/manager.c')
-rw-r--r-- | hcid/manager.c | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/hcid/manager.c b/hcid/manager.c index d470e53b..c4288278 100644 --- a/hcid/manager.c +++ b/hcid/manager.c @@ -312,8 +312,10 @@ static DBusHandlerResult list_services(DBusConnection *conn, static DBusHandlerResult activate_service(DBusConnection *conn, DBusMessage *msg, void *data) { + DBusMessage *reply; const char *pattern; struct service *service; + const char *busname = "org.bluez"; if (!dbus_message_get_args(msg, NULL, DBUS_TYPE_STRING, &pattern, @@ -324,29 +326,14 @@ static DBusHandlerResult activate_service(DBusConnection *conn, if (!service) return error_no_such_service(conn, msg); - if (service->bus_name) { - DBusMessage *reply; - - reply = dbus_message_new_method_return(msg); - if (!reply) - return DBUS_HANDLER_RESULT_NEED_MEMORY; - - dbus_message_append_args(reply, - DBUS_TYPE_STRING, &service->bus_name, - DBUS_TYPE_INVALID); - - 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_errno(conn, msg, ENOEXEC); + reply = dbus_message_new_method_return(msg); + if (!reply) + return DBUS_HANDLER_RESULT_NEED_MEMORY; - service->action = dbus_message_ref(msg); + dbus_message_append_args(reply, DBUS_TYPE_STRING, &busname, + DBUS_TYPE_INVALID); - return DBUS_HANDLER_RESULT_HANDLED; + return send_message_and_unref(conn, reply); } static DBusMethodVTable old_manager_methods[] = { |