summaryrefslogtreecommitdiffstats
path: root/hcid/adapter.c
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2008-03-10 14:20:50 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2008-03-10 14:20:50 +0000
commitea00a446dbacead62040dd2bd7e663774c205c04 (patch)
tree08f24f974723748e5a63b68329193f43d8d9d24d /hcid/adapter.c
parent4e6726e8029f20be3e08b44760c56fc7a419090b (diff)
added new function to convert uuid to string(uuid128)
Diffstat (limited to 'hcid/adapter.c')
-rw-r--r--hcid/adapter.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/hcid/adapter.c b/hcid/adapter.c
index 754c7b1f..77d0b0f8 100644
--- a/hcid/adapter.c
+++ b/hcid/adapter.c
@@ -3178,9 +3178,10 @@ static DBusHandlerResult list_devices(DBusConnection *conn,
static void discover_services_cb(gpointer user_data, sdp_list_t *recs, int err)
{
- sdp_list_t *uuids, *seq, *next, *svcclass;
+ sdp_list_t *seq, *next, *svcclass;
struct adapter *adapter = user_data;
DBusMessage *reply;
+ GSList *uuids;
const char *path;
if (err < 0) {
@@ -3199,9 +3200,9 @@ static void discover_services_cb(gpointer user_data, sdp_list_t *recs, int err)
svcclass = NULL;
if (sdp_get_service_classes(rec, &svcclass) == 0) {
/* Extract the first element and skip the remainning */
- uuid_t *u = malloc(sizeof(uuid_t));
- memcpy(u, svcclass->data, sizeof(uuid_t));
- uuids = sdp_list_append(uuids, u);
+ gchar *uuid_str = bt_uuid2string(svcclass->data);
+ if (uuid_str)
+ uuids = g_slist_append(uuids, uuid_str);
sdp_list_free(svcclass, free);
}