summaryrefslogtreecommitdiff
path: root/android/main.c
diff options
context:
space:
mode:
authorLukasz Rymanowski <lukasz.rymanowski@tieto.com>2014-03-06 10:38:01 +0100
committerSzymon Janc <szymon.janc@tieto.com>2014-03-10 10:18:35 +0100
commitd19b133b1d389cd72cc1853100806a975dec2880 (patch)
treefa8a830c2156fb4a13cf94120a6d8723031a2534 /android/main.c
parent67b4f4778b34cb06315fa0e30eabf5264650f007 (diff)
downloadbluez-d19b133b1d389cd72cc1853100806a975dec2880.tar.gz
android: Enable mgmt debug logs
This patch introduce possibility to enable mgmt interface logs. In order to enable it is required to set property: persist.sys.bluetooth.mgmtdbg to 1 or literaly "true". More info in README
Diffstat (limited to 'android/main.c')
-rw-r--r--android/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/android/main.c b/android/main.c
index edec7dcff..a34f885f5 100644
--- a/android/main.c
+++ b/android/main.c
@@ -345,6 +345,7 @@ static guint setup_signalfd(void)
static gboolean option_version = FALSE;
static gint option_index = -1;
static gboolean option_dbg = FALSE;
+static gboolean option_mgmt_dbg = FALSE;
static GOptionEntry options[] = {
{ "version", 'v', 0, G_OPTION_ARG_NONE, &option_version,
@@ -353,6 +354,9 @@ static GOptionEntry options[] = {
"Use specified controller", "INDEX"},
{ "debug", 'd', 0, G_OPTION_ARG_NONE, &option_dbg,
"Enable debug logs", NULL},
+ { "mgmt-debug", 0, 0, G_OPTION_ARG_NONE, &option_mgmt_dbg,
+ "Enable mgmt debug logs", NULL},
+
{ NULL }
};
@@ -476,7 +480,7 @@ int main(int argc, char *argv[])
if (!signal)
return EXIT_FAILURE;
- if (option_dbg)
+ if (option_dbg || option_mgmt_dbg)
__btd_log_init("*", 0);
else
__btd_log_init(NULL, 0);
@@ -496,7 +500,7 @@ int main(int argc, char *argv[])
return EXIT_FAILURE;
}
- if (!bt_bluetooth_start(option_index, adapter_ready)) {
+ if (!bt_bluetooth_start(option_index, option_mgmt_dbg, adapter_ready)) {
__btd_log_cleanup();
g_source_remove(bluetooth_start_timeout);
g_source_remove(signal);