Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. @@ -105,9 +105,9 @@ static void primary_by_uuid_cb(guint8 status, const guint8 *ipdu,
  2. struct discover_primary *dp = user_data;
  3. GSList *ranges, *last;
  4. struct att_range *range;
  5. - uint8_t opdu[ATT_DEFAULT_LE_MTU];
  6. + uint8_t *opdu;
  7. guint16 oplen;
  8. - int err = 0;
  9. + int err = 0, buflen;
  10.  
  11. if (status) {
  12. err = status == ATT_ECODE_ATTR_NOT_FOUND ? 0 : status;
  13. @@ -126,8 +126,9 @@ static void primary_by_uuid_cb(guint8 status, const guint8 *ipdu,
  14. if (range->end == 0xffff)
  15. goto done;
  16.  
  17. + opdu = g_attrib_get_buffer(dp->attrib, &buflen);
  18. oplen = encode_discover_primary(range->end + 1, 0xffff, &dp->uuid,
  19. - opdu, sizeof(opdu));
  20. + opdu, buflen);
  21.  
  22. if (oplen == 0)
  23. goto done;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement