Diff between 67e35de97e2a7b940ee52274577df448cffe4e33 and a03720a1d9bdf259c18218174cb602c76ccfcb61

Changed Files

File Additions Deletions Status
monitor/main.c +2 -5 modified

Full Patch

diff --git a/monitor/main.c b/monitor/main.c
index c904166..f9bca22 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();