From: "Timo Teräs" <ext-timo.teras@nokia.com>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] [PATCH] RFCOMM does not call tty_hangup() when DCD is de-asserted
Date: Wed, 20 Apr 2005 16:26:21 +0300 [thread overview]
Message-ID: <4266587D.9030806@nokia.com> (raw)
In-Reply-To: <1114000772.2469.168.camel@pegasus>
Hi Marcel,
ext Marcel Holtmann wrote:
> from my part this patch looks fine, but I don't like the modem emulatio=
n
> part of RFCOMM in general. For me it is only a stream. Nothing less and
> nothing more. So if this patch is useful I am going to apply it.
PPP relies on this behaviour to detect when remote side has hang up the
call. So PPP will be broken without this patch.
>>+ if ((dev->modem_status & TIOCM_CD) &&
>>+ !(v24_sig & RFCOMM_V24_DV)) {
>=20
> You must comply with the coding style here. So change it into
>=20
> if ((dev->modem_status & TIOCM_CD) && !(v24_sig & RFCOMM_V24_DV)) {
Fixed. I also added check for CLOCAL being unset. If it is set modem cont=
rol
lines should be ignored (also the uart code check for this).
Cheers,
Timo
Signed-off-by: Timo Ter=E4s <ext-timo.teras@nokia.com>
=3D=3D=3D=3D=3D net/bluetooth/rfcomm/tty.c 1.36 vs edited =3D=3D=3D=3D=3D
--- 1.36/net/bluetooth/rfcomm/tty.c 2005-04-13 15:55:20 +03:00
+++ edited/net/bluetooth/rfcomm/tty.c 2005-04-20 15:56:31 +03:00
@@ -531,6 +531,11 @@ static void rfcomm_dev_modem_status(stru
BT_DBG("dlc %p dev %p v24_sig 0x%02x", dlc, dev, v24_sig);
+ if ((dev->modem_status & TIOCM_CD) && !(v24_sig & RFCOMM_V24_DV))=
{
+ if (dev->tty && !C_CLOCAL(dev->tty))
+ tty_hangup(dev->tty);
+ }
+
dev->modem_status =3D
((v24_sig & RFCOMM_V24_RTC) ? (TIOCM_DSR | TIOCM_DTR) : =
0) |
((v24_sig & RFCOMM_V24_RTR) ? (TIOCM_RTS | TIOCM_CTS) : =
0) |
-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next prev parent reply other threads:[~2005-04-20 13:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-20 11:22 [Bluez-devel] [PATCH] RFCOMM does not call tty_hangup() when DCD is de-asserted Timo Teräs
2005-04-20 12:39 ` Marcel Holtmann
2005-04-20 13:26 ` Timo Teräs [this message]
2005-04-21 21:09 ` [Bluez-devel] [PATCH] RFCOMM does not call tty_hangup() whenDCD " Victor Shcherbatyuk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4266587D.9030806@nokia.com \
--to=ext-timo.teras@nokia.com \
--cc=bluez-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox