Hi, On Tue, Nov 12, 2013, Szymon Janc wrote: > +static void add_uuid(uint8_t svc_hint, uint128_t *uuid) > +{ > + struct mgmt_cp_add_uuid cp; > + > + htob128(uuid, (uint128_t *) cp.uuid); > + cp.svc_hint = svc_hint; > + > + mgmt_send(adapter->mgmt, MGMT_OP_ADD_UUID, > + adapter->index, sizeof(cp), &cp, > + add_uuid_complete, NULL, NULL); > +} > + > +int bt_adapter_add_record(uint16_t uuid, sdp_record_t *rec, uint8_t svc_hint) Is it really so that we can't infer the UUID by looking inside sdp_record_t? (e.g. just use rec->svclass). > +{ > + uint128_t uint128; > + > + if (g_slist_find(adapter->uuids, GUINT_TO_POINTER(uuid))) { > + DBG("UUID 0x%x already added", uuid); > + return -1; > + } Shouldn't this be return -EALREADY? > + adapter->uuids = g_slist_prepend(adapter->uuids, > + GUINT_TO_POINTER(uuid)); > + > + uuid16_to_uint128(uuid, &uint128); > + > + add_uuid(svc_hint, &uint128); If we only support adding UUID-16, then how about just providing uint16_t to add/remove_uuid and do the conversion inside these functions? > +void bt_adapter_remove_record(uint16_t uuid, int handle) The type that sdp_record_t uses for the handle is uint32_t so the parameter here should reflect that. Johan -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html