From 02cfd6626e54c3ba9385769e1a3a3ef0df9f6c30 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 12 Feb 2015 11:02:27 +0200 Subject: [PATCH] tools/btmgmt: Remove unneeded bt_gap code The bt_gap API is a useful one, but btmgmt really only needs to access shared/mgmt, at least for now. --- tools/btmgmt.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/tools/btmgmt.c b/tools/btmgmt.c index 49459e3fa..512554448 100644 --- a/tools/btmgmt.c +++ b/tools/btmgmt.c @@ -56,7 +56,6 @@ #include "src/shared/io.h" #include "src/shared/util.h" #include "src/shared/mgmt.h" -#include "src/shared/gap.h" static struct mgmt *mgmt = NULL; static uint16_t mgmt_index = MGMT_INDEX_NONE; @@ -3389,10 +3388,6 @@ done: free(input); } -static void gap_ready(bool status, void *user_data) -{ -} - static void usage(void) { int i; @@ -3443,7 +3438,6 @@ static struct io *setup_stdin(void) int main(int argc, char *argv[]) { - struct bt_gap *gap; struct io *input; uint16_t index = MGMT_INDEX_NONE; int status, opt; @@ -3471,13 +3465,6 @@ int main(int argc, char *argv[]) mainloop_init(); - if (index == MGMT_INDEX_NONE) - gap = bt_gap_new_default(); - else - gap = bt_gap_new_index(index); - - bt_gap_set_ready_handler(gap, gap_ready, NULL, NULL); - mgmt = mgmt_new_default(); if (!mgmt) { fprintf(stderr, "Unable to open mgmt_socket\n"); @@ -3574,7 +3561,5 @@ int main(int argc, char *argv[]) mgmt_unregister_all(mgmt); mgmt_unref(mgmt); - bt_gap_unref(gap); - return status; } -- 2.47.3