From 44847d5dfc0eebba1cebad1fbc89895901bfe09b Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Wed, 25 Apr 2007 22:14:22 +0000 Subject: Added UpdateServiceRecord --- hcid/dbus-common.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'hcid/dbus-common.c') diff --git a/hcid/dbus-common.c b/hcid/dbus-common.c index 7ea19ba9..cccf8da4 100644 --- a/hcid/dbus-common.c +++ b/hcid/dbus-common.c @@ -451,6 +451,23 @@ int register_sdp_record(sdp_record_t *rec) return err; } +int update_sdp_record(uint32_t handle, sdp_record_t *rec) +{ + if (!get_sdp_session()) + return -1; + + /* Update on the server */ + rec->handle = handle; + if (sdp_device_record_update(sess, BDADDR_ANY, rec)) { + cleanup_sdp_session(); + error("Service Record update failed: %s(%d).\n", + strerror(errno), errno); + return -1; + } + + return 0; +} + int unregister_sdp_record(uint32_t handle) { int err; -- cgit