From: Jerzy Kasenberg Date: Thu, 31 Oct 2013 10:45:09 +0000 (+0100) Subject: android/client: Add init/cleanup for GATT X-Git-Tag: android-x86-4.4-r3~7064 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=c621c15d5e719ff91d5fa37bc31955be220bd335;p=android-x86%2Fexternal-bluetooth-bluez.git android/client: Add init/cleanup for GATT This patch adds gatt functions code. --- diff --git a/android/client/if-gatt.c b/android/client/if-gatt.c index 1d3730d9f..d5e2d72a5 100644 --- a/android/client/if-gatt.c +++ b/android/client/if-gatt.c @@ -496,12 +496,20 @@ static const btgatt_callbacks_t gatt_cbacks = { static void init_p(int argc, const char **argv) { + RETURN_IF_NULL(if_gatt); + + EXEC(if_gatt->init, &gatt_cbacks); } /* cleanup */ static void cleanup_p(int argc, const char **argv) { + RETURN_IF_NULL(if_gatt); + + EXECV(if_gatt->cleanup); + + if_gatt = NULL; } static struct method methods[] = {