Diff between 84ae21bb319cba6887499066983da6f8afc43690 and c42ce772bca5af73910e99e7c88f2b642b94bd32

Changed Files

File Additions Deletions Status
android/client/if-gatt.c +12 -0 modified

Full Patch

diff --git a/android/client/if-gatt.c b/android/client/if-gatt.c
index 64429e4..6b4ff28 100644
--- a/android/client/if-gatt.c
+++ b/android/client/if-gatt.c
@@ -969,6 +969,9 @@ static void connect_p(int argc, const char **argv)
 	int client_if;
 	bt_bdaddr_t bd_addr;
 	int is_direct = 1;
+#if ANDROID_VERSION >= PLATFORM_VER(5, 0, 0)
+	int transport = 1;
+#endif
 
 	RETURN_IF_NULL(if_gatt);
 	VERIFY_CLIENT_IF(2, client_if);
@@ -978,7 +981,16 @@ static void connect_p(int argc, const char **argv)
 	if (argc > 4)
 		is_direct = atoi(argv[4]);
 
+#if ANDROID_VERSION < PLATFORM_VER(5, 0, 0)
 	EXEC(if_gatt->client->connect, client_if, &bd_addr, is_direct);
+#else
+	/* transport */
+	if (argc > 5)
+		transport = atoi(argv[5]);
+
+	EXEC(if_gatt->client->connect, client_if, &bd_addr, is_direct,
+								transport);
+#endif
 }
 
 /* disconnect */