All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Collin R. Mulliner" <collin@betaversion.net>
To: bluez-devel@lists.sourceforge.net
Subject: [Bluez-devel] patch for: RFComm dynamic channel allocation
Date: Thu, 8 Jul 2004 16:52:19 +0200	[thread overview]
Message-ID: <20040708165219.16a1d6db@coredump> (raw)

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

Hi,

just found and fixed the problem with dynamic rfcomm channel allocation.
My code binds to a specific local bdaddr, the rfcomm tool binds to ANY.
This case was not handled correctly. The fix is simple, see attachment.


... Collin

-- 
Collin R. Mulliner <collin@betaversion.net>
BETAVERSiON Systems [www.betaversion.net]
info/pgp: finger collin@betaversion.net
Just don't create a file called -rf.  :-)  --Larry Wall

[-- Attachment #2: rfcomm_dynamic_channel_alloc_fix.patch --]
[-- Type: application/octet-stream, Size: 382 bytes --]

--- sock.c_orig	2004-07-08 16:39:29.000000000 +0200
+++ sock.c	2004-07-08 16:47:28.000000000 +0200
@@ -407,7 +407,7 @@
 		write_lock_bh(&rfcomm_sk_list.lock);
 
 		for (channel = 1; channel < 31; channel++)
-			if (!__rfcomm_get_sock_by_addr(channel, src)) {
+			if (!__rfcomm_get_sock_by_channel(0, channel, src)) {
 				rfcomm_pi(sk)->channel = channel;
 				err = 0;
 				break;

             reply	other threads:[~2004-07-08 14:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-08 14:52 Collin R. Mulliner [this message]
2004-07-08 17:37 ` [Bluez-devel] patch for: RFComm dynamic channel allocation Marcel Holtmann
2004-07-08 18:08   ` Collin R. Mulliner
2004-07-08 18:36     ` Marcel Holtmann
     [not found]       ` <20040709012301.5a966440@coredump>
2004-07-09 10:15         ` Marcel Holtmann

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=20040708165219.16a1d6db@coredump \
    --to=collin@betaversion.net \
    --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.