Thread (7 messages) 7 messages, 2 authors, 2014-01-06

Re: [PATCH v2 3/4] rfcomm: always wait for a bt connection on open()

flat view

From: Gianluca Anzolin <hidden>
Date: 2014-01-06 19:37:32

On Mon, Jan 06, 2014 at 11:17:06AM -0800, Marcel Holtmann wrote:
don’t do an if-else-else if statement here. Just break.

	if (dev->dlc->state == BT_CLOSED) {
		..
		break;	
	}

	if (dev->dlc->state == BT_CONNECTED)
		break;

	if (signal_pending(..)) {
		..
		break;
	}
I'll change the code.
quoted
-	rfcomm_tty_driver->init_termios.c_cflag	= B9600 | CS8 | CREAD | HUPCL;
+	rfcomm_tty_driver->init_termios.c_cflag	= B9600 | CS8 | CREAD | HUPCL | CLOCAL;
Is adding CLOCAL by default intentional?
Yes, I removed it before because I relied on the carrier_raised() tty_port
method. But it turned out it wasn't a good idea because some code (wvdial
for example) set that flag on exit, leaving a non-working tty for subsequent
open() calls.

Now I restored the original flags, even if CLOCAL is actually ignored by the
code.

I will shortly send a third iteration with the fixed if statements.

Thanks,
Gianluca
quoted
	rfcomm_tty_driver->init_termios.c_lflag &= ~ICANON;
	tty_set_operations(rfcomm_tty_driver, &rfcomm_ops);
Regards

Marcel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help