summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-manager.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-01-15 17:06:27 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-01-15 17:06:27 +0000
commite1a0779f9e09f4620fdbb977f9e0a67caafdc5f3 (patch)
tree70b40c3b6d3bb50bb909b3269e8f55719e711bd0 /hcid/dbus-manager.c
parente8b9bf6bfc52751b75ade32609817ab859a3e889 (diff)
Preliminary support for executing a service when Start is called
Diffstat (limited to 'hcid/dbus-manager.c')
-rw-r--r--hcid/dbus-manager.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/hcid/dbus-manager.c b/hcid/dbus-manager.c
index 9418f9ab..524b7d14 100644
--- a/hcid/dbus-manager.c
+++ b/hcid/dbus-manager.c
@@ -272,7 +272,7 @@ static DBusHandlerResult add_service_record(DBusConnection *conn,
return error_invalid_arguments(conn, msg);
}
- if (!service || strcmp(dbus_message_get_sender(msg), service->id))
+ if (!service || strcmp(dbus_message_get_sender(msg), service->bus_name))
return error_not_authorized(conn, msg);
dbus_message_iter_next(&iter);
@@ -296,7 +296,7 @@ static DBusHandlerResult add_service_record(DBusConnection *conn,
/* Assign a new handle */
rec->ext_handle = next_handle++;
- if (service->id) {
+ if (service->bus_name) {
uint32_t handle = 0;
if (register_sdp_record(rec->buf->data, rec->buf->data_size, &handle) < 0) {
@@ -350,7 +350,7 @@ static DBusHandlerResult add_service_record_xml(DBusConnection *conn,
return error_invalid_arguments(conn, msg);
}
- if (!service || strcmp(dbus_message_get_sender(msg), service->id))
+ if (!service || strcmp(dbus_message_get_sender(msg), service->bus_name))
return error_not_authorized(conn, msg);
reply = dbus_message_new_method_return(msg);
@@ -397,7 +397,7 @@ static DBusHandlerResult add_service_record_xml(DBusConnection *conn,
/* Assign a new handle */
rec->ext_handle = next_handle++;
- if (service->id) {
+ if (service->bus_name) {
uint32_t handle = 0;
if (register_sdp_record(rec->buf->data, rec->buf->data_size, &handle) < 0) {
@@ -450,7 +450,7 @@ static DBusHandlerResult remove_service_record(DBusConnection *conn,
return error_invalid_arguments(conn, msg);
}
- if (!service || strcmp(dbus_message_get_sender(msg), service->id))
+ if (!service || strcmp(dbus_message_get_sender(msg), service->bus_name))
return error_not_authorized(conn, msg);
@@ -466,7 +466,7 @@ static DBusHandlerResult remove_service_record(DBusConnection *conn,
service->records = g_slist_remove(service->records, rec);
/* If the service is running: remove it from the from sdpd */
- if (service->id && rec->handle != 0xffffffff) {
+ if (service->bus_name && rec->handle != 0xffffffff) {
if (unregister_sdp_record(rec->handle) < 0) {
error("Service record unregistration failed: %s (%d)",
strerror(errno), errno);