diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2016-04-29 12:11:41 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2016-04-29 12:11:41 +0300 |
commit | a03720a1d9bdf259c18218174cb602c76ccfcb61 (patch) | |
tree | e9787fcfc35cc96335ceb453c79442006fb2831a /monitor/main.c | |
parent | 67e35de97e2a7b940ee52274577df448cffe4e33 (diff) | |
download | bluez-a03720a1d9bdf259c18218174cb602c76ccfcb61.tar.gz |
monitor: Disable monitor socket if a TTY is used
For now we don't have a way of resolving index conflicts between a TTY
and a monitor socket. Simply disable the monitor socket for now if a
TTY is used.
Diffstat (limited to 'monitor/main.c')
-rw-r--r-- | monitor/main.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/monitor/main.c b/monitor/main.c index c9041663e..f9bca221a 100644 --- a/monitor/main.c +++ b/monitor/main.c @@ -229,13 +229,10 @@ int main(int argc, char *argv[]) if (ellisys_server) ellisys_enable(ellisys_server, ellisys_port); - if (tty && control_tty(tty, tty_speed) < 0) + if (!tty && control_tracing() < 0) return EXIT_FAILURE; - /* Accept error here if we have a successfully opened TTY - * (could happen if btmon is run as a normal user). - */ - if (control_tracing() < 0 && !tty) + if (tty && control_tty(tty, tty_speed) < 0) return EXIT_FAILURE; exit_status = mainloop_run(); |