summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-database.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-08-22 01:50:41 +0000
committerMarcel Holtmann <marcel@holtmann.org>2007-08-22 01:50:41 +0000
commitb22d297c0c679b400d7825367e31fed46c552a49 (patch)
tree48f403d960004356af7ce70bedfc4f2490231945 /hcid/dbus-database.c
parent145dfdd4b2e09f6b5b9e0be03d134c0242261b81 (diff)
First attempt for automatic setting of service classes value
Diffstat (limited to 'hcid/dbus-database.c')
-rw-r--r--hcid/dbus-database.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/hcid/dbus-database.c b/hcid/dbus-database.c
index 1c770c83..384df032 100644
--- a/hcid/dbus-database.c
+++ b/hcid/dbus-database.c
@@ -44,6 +44,7 @@
#include "hcid.h"
#include "sdpd.h"
#include "sdp-xml.h"
+#include "manager.h"
#include "adapter.h"
#include "dbus-hci.h"
#include "dbus-common.h"
@@ -85,6 +86,8 @@ static void exit_callback(const char *name, void *user_data)
else
unregister_sdp_record(user_record->handle);
+ update_class_of_device();
+
if (user_record->sender)
g_free(user_record->sender);
@@ -145,6 +148,8 @@ static DBusHandlerResult add_service_record(DBusConnection *conn,
}
}
+ update_class_of_device();
+
sender = dbus_message_get_sender(msg);
user_record->sender = g_strdup(sender);
@@ -206,6 +211,8 @@ static DBusHandlerResult add_service_record_from_xml(DBusConnection *conn,
sdp_record_free(sdp_record);
}
+ update_class_of_device();
+
sender = dbus_message_get_sender(msg);
user_record->sender = g_strdup(sender);
@@ -255,6 +262,8 @@ static DBusHandlerResult update_record(DBusConnection *conn, DBusMessage *msg,
}
}
+ update_class_of_device();
+
return send_message_and_unref(conn,
dbus_message_new_method_return(msg));
}
@@ -357,6 +366,8 @@ static DBusHandlerResult remove_service_record(DBusConnection *conn,
else
unregister_sdp_record(handle);
+ update_class_of_device();
+
if (user_record->sender)
g_free(user_record->sender);