From a03720a1d9bdf259c18218174cb602c76ccfcb61 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 29 Apr 2016 12:11:41 +0300 Subject: [PATCH] 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. --- monitor/main.c | 7 ++----- 1 file 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(); -- 2.47.3