--- android/gatt.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/android/gatt.c b/android/gatt.c index b246137..d9dff4f 100644 --- a/android/gatt.c +++ b/android/gatt.c @@ -580,13 +580,12 @@ static struct service *create_service(uint8_t id, bool primary, char *uuid, /* Put primary service to our local list */ s->primary = primary; - if (s->primary) + if (s->primary) { memcpy(&s->prim, data, sizeof(s->prim)); - else + } else { memcpy(&s->incl, data, sizeof(s->incl)); - - if (!s->primary) return s; + } /* For primary service allocate queue for included services */ s->included = queue_new(); -- 1.8.3.1 -- 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