All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mayank BATRA <mayank.batra@st.com>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] SPP connections
Date: Tue, 23 Jan 2007 09:50:50 +0530	[thread overview]
Message-ID: <45B58D22.7030908@st.com> (raw)
In-Reply-To: <be976db60701221642w1a2ff16wd8f51f44e4db3185@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 820 bytes --]

Hi Mark,

> I have a program and listen for connections from a device that uses
> SPP.  My program just opens RFCOMM socket and waits for connection to
> come in.  The device that connects into my program has a connection LED
> indicating a successful connections.
> 
> I have noticed that if close my RFCOMM socket, even if I stop my
> listener process, the connection LED on the device remains lit.  The
> only thing I get it to not lit (and thus indicates that it is giving up
> on that connection) is to remove my USB bluetooth dongle.

I also faced the same problem sometime ago and Marcel gave me the
attached patch which fixed the problem.
By the way, which kernel are you using? This problem is there only in
older kernel versions.

Best Regards,

Mayank

--
Random Quote Follows:
Recursive, adj.; see Recursive

[-- Attachment #2: patch-rfcomm-incoming-session-refcount.txt --]
[-- 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-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

      reply	other threads:[~2007-01-23  4:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-23  0:42 [Bluez-devel] SPP connections Mark S. Townsley
2007-01-23  4:20 ` Mayank BATRA [this message]

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=45B58D22.7030908@st.com \
    --to=mayank.batra@st.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 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.