public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] patch for: RFComm dynamic channel allocation
@ 2004-07-08 14:52 Collin R. Mulliner
  2004-07-08 17:37 ` Marcel Holtmann
  0 siblings, 1 reply; 5+ messages in thread
From: Collin R. Mulliner @ 2004-07-08 14:52 UTC (permalink / raw)
  To: bluez-devel

[-- 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;

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-07-09 10:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-08 14:52 [Bluez-devel] patch for: RFComm dynamic channel allocation Collin R. Mulliner
2004-07-08 17:37 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox