Thread (11 messages) read the whole thread 11 messages, 2 authors, 2012-01-25

Re: [PATCH 3/8] gatt-service: Provide service uuid in attrib_db_find_avail function

From: Anderson Lizardo <hidden>
Date: 2012-01-25 11:01:46

Hi Santiago,

On Wed, Jan 25, 2012 at 6:03 AM, Santiago Carot-Nemesio
[off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -436,8 +440,8 @@ static void register_weight_service(struct gatt_example_adapter *adapter,
       int len;

       btoh128(&char_weight_uuid_btorder, &char_weight_uuid);
-
-       start_handle = attrib_db_find_avail(adapter->adapter, svc_size);
+       bt_uuid128_create(&uuid, prim_weight_uuid_btorder);
+       start_handle = attrib_db_find_avail(adapter->adapter, &uuid, svc_size);
       if (start_handle == 0) {
               error("Not enough free handles to register service");
               return;
This is still not right. bt_uuid128_create() should receive a
uint128_t in *host* order. In other words, you need to do:

uint128_t prim_weight_uuid;
...
btoh128(&prim_weight_uuid_btorder, &prim_weight_uuid);
bt_uuid128_create(&uuid, prim_weight_uuid);
...

Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help