--- android/gatt.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/android/gatt.c b/android/gatt.c index 9e950ec..f035e3f 100644 --- a/android/gatt.c +++ b/android/gatt.c @@ -575,6 +575,13 @@ static int register_app(const uint8_t *uuid, gatt_app_type_t app_type) return 0; } + if ((app->type == APP_SERVER) && + !queue_push_tail(listen_apps, INT_TO_PTR(app->id))) { + error("gatt: Cannot push server on the list"); + destroy_gatt_app(app); + return 0; + } + return app->id; } -- 1.8.4 -- 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