Diff between b8c6e30f5c40591baa1e570415d540d6fc2e7da3 and 89dab07b096ec5c46d18d44bb803b21014ce415e
Changed Files
| File | Additions | Deletions | Status |
| android/gatt.c | +7 | -0 | modified |
Full Patch
diff --git a/android/gatt.c b/android/gatt.c
index a31d01a..e2f11d3 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;
}