Diff between f7f78d7cb50dfa4af5ed3da4ffe10125fcbc23c4 and 09930d0047f10e7946564c95e24f1f8b18b499be

Changed Files

File Additions Deletions Status
android/client/if-hl.c +19 -0 modified

Full Patch

diff --git a/android/client/if-hl.c b/android/client/if-hl.c
index 6d1d8c4..ddf4d4b 100644
--- a/android/client/if-hl.c
+++ b/android/client/if-hl.c
@@ -180,6 +180,24 @@ static void connect_channel_p(int argc, const char **argv)
 								&channel_id);
 }
 
+/* destroy_channel */
+
+static void destroy_channel_p(int argc, const char **argv)
+{
+	uint32_t channel_id;
+
+	RETURN_IF_NULL(if_hl);
+
+	if (argc <= 2) {
+		haltest_error("No channel id is specified");
+		return;
+	}
+
+	channel_id = (uint32_t) atoi(argv[2]);
+
+	EXEC(if_hl->destroy_channel, channel_id);
+}
+
 /* cleanup */
 
 static void cleanup_p(int argc, const char **argv)
@@ -199,6 +217,7 @@ static struct method methods[] = {
 		"..."),
 	STD_METHODH(unregister_application, "<app_id>"),
 	STD_METHODH(connect_channel, "<app_id> <bd_addr> <mdep_cfg_index>"),
+	STD_METHODH(destroy_channel, "<channel_id>"),
 	STD_METHOD(cleanup),
 	END_METHOD
 };