summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-manager.c
diff options
context:
space:
mode:
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);