From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ users <bluez-users@lists.sourceforge.net>
Subject: Re: [Bluez-users] L2CAP disconnect problem
Date: Fri, 24 Nov 2006 07:14:21 +0100 [thread overview]
Message-ID: <1164348861.28284.4.camel@localhost> (raw)
In-Reply-To: <017801c70f8d$a9d62ea0$8935c70a@dlh.st.com>
[-- Attachment #1: Type: text/plain, Size: 1204 bytes --]
Hi Sumeet,
> I investigated the RFCOMM disconnect problem in more detail and found out
> that when the device is a listener, it expects the initiator of RFCOMM
> connection to disconnect dlci 0. But all devices don't send RFCOMM DISC for
> dlci 0. For ex PTS doesn't disconnect dlci 0 in case of HS profile testing
> Test Case:
> -> IUT (BlueZ) is HS Gateway, PTS is HS
> -> PTS initiates connection and then disconnect
> -> RFCOMM data channel is disconnected by BlueZ but it waits for PTS to
> disconnect RFCOMM control channel which doesn't happen.
> -> As a result test case fails
>
> The HS Spec says HS Gateway is responsible for disconnecting the connection.
> In that case I think there is a misbehaviour here.
>
> If there is something I am missing in understanding the RFCOMM
> implementation and this problem, please correct me.
> Otherwise do you have a patch to solve this problem, wherein the listener
> disconnects dlci 0?
I told you that this was a known bug and we fixed it. You should have
tested a recent 2.6 kernel and this basically means 2.6.18 or even
later. Not an ancient RHEL4 kernel. Anyway, this is the patch that went
in upstream to fix this problem.
Regards
Marcel
[-- Attachment #2: patch-rfcomm-incoming-session-refcount --]
[-- Type: text/plain, Size: 1079 bytes --]
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2005/03/18 13:25:42+01:00 marcel@holtmann.org
# [Bluetooth] Fix session reference counting for RFCOMM
#
# When an incoming connection terminates, the signal DLC is never
# closed and thus the underlaying L2CAP connection stays open. This
# problem doesn't show up often, because most times the other side
# takes care of terminating the signal DLC.
#
# Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
#
# net/bluetooth/rfcomm/core.c
# 2005/03/18 13:24:00+01:00 marcel@holtmann.org +4 -0
# Fix session reference counting for RFCOMM
#
diff -Nru a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
--- a/net/bluetooth/rfcomm/core.c 2005-03-18 13:30:07 +01:00
+++ b/net/bluetooth/rfcomm/core.c 2005-03-18 13:30:07 +01:00
@@ -389,6 +389,8 @@
rfcomm_dlc_unlock(d);
skb_queue_purge(&d->tx_queue);
+ rfcomm_session_put(s);
+
rfcomm_dlc_unlink(d);
}
@@ -597,6 +599,8 @@
*err = -ENOMEM;
goto failed;
}
+
+ rfcomm_session_hold(s);
s->initiator = 1;
[-- Attachment #3: Type: text/plain, Size: 347 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- Attachment #4: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users
next prev parent reply other threads:[~2006-11-24 6:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-20 11:45 [Bluez-users] L2CAP disconnect problem Sumeet VERMA
2006-11-20 12:40 ` Marcel Holtmann
2006-11-21 7:16 ` Sumeet VERMA
2006-11-21 7:27 ` Marcel Holtmann
2006-11-22 5:43 ` Sumeet VERMA
2006-11-22 6:23 ` Marcel Holtmann
2006-11-24 5:59 ` Sumeet VERMA
2006-11-24 6:14 ` Marcel Holtmann [this message]
2006-11-24 6:27 ` Sumeet VERMA
2006-11-24 7:15 ` Sumeet VERMA
2006-11-24 7:31 ` Marcel Holtmann
2006-11-24 8:52 ` Sumeet VERMA
2006-11-24 17:25 ` Marcel Holtmann
2006-11-24 8:53 ` Sumeet VERMA
2006-11-24 9:01 ` Sumeet VERMA
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=1164348861.28284.4.camel@localhost \
--to=marcel@holtmann.org \
--cc=bluez-users@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.