diff options
author | Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com> | 2015-04-29 11:15:53 +0200 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2015-05-08 14:54:05 +0200 |
commit | 67eccade2d38f790b0698b6e2cbcd6282b21e534 (patch) | |
tree | 3e87538baf250af496aafa09c6edef01c68ca844 /android/gatt.c | |
parent | 6a44a69acead3e0d5a5bf5879f7ae312d419e022 (diff) | |
download | bluez-67eccade2d38f790b0698b6e2cbcd6282b21e534.tar.gz |
android/gatt: Fix updating mtu for no registered app
Gatt shouldn't notify about updating mtu if no apps are registered.
Without this patch, while connecting crash can occur.
Diffstat (limited to 'android/gatt.c')
-rw-r--r-- | android/gatt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/android/gatt.c b/android/gatt.c index 625b7dfbf..b8074a937 100644 --- a/android/gatt.c +++ b/android/gatt.c @@ -978,6 +978,11 @@ static void notify_mtu_change(void *data, void *user_data) if (conn->device != device) return; + if (!conn->app) { + error("gatt: can't notify mtu - no app registered for conn"); + return; + } + switch (conn->app->type) { case GATT_CLIENT: notify_client_mtu_change(conn, true); |