Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 06 Apr 2005 14:33:00 -0700
From:      Maksim Yevmenkin <maksim.yevmenkin@savvis.net>
To:        freebsd-bluetooth@freebsd.org
Subject:   Recent bluetooth problems
Message-ID:  <4254558C.1020708@savvis.net>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------040300090805040104050607
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Dear Bluetooth Users,

recently i have received few email that describe problems with 
rfcomm_pppd(8), gammu and gnokki. it turns out there was a bug in my 
code. rfcomm protocol was incorrectly marked as PR_ATOMIC (exchange 
atomic messages only). the problem was that any data left (after a 
read(2) call) in the rfcomm socket buffer were incorrectly discarded.

the attached patch was committed to -current. i have verified that it 
fixes gnokii problem, but i'm interested to know if it fixes other 
problems as well. please try it and let me know if you still have problems.

thanks,
max

--------------040300090805040104050607
Content-Type: text/plain;
 name="ng_btsocket.c.diff.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="ng_btsocket.c.diff.txt"

===================================================================
RCS file: /usr/local/www/cvsroot/FreeBSD/src/sys/netgraph/bluetooth/socket/ng_btsocket.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -r1.10 -r1.11
--- src/sys/netgraph/bluetooth/socket/ng_btsocket.c	2005/01/07 01:45:44	1.10
+++ src/sys/netgraph/bluetooth/socket/ng_btsocket.c	2005/04/06 20:54:05	1.11
@@ -28,7 +28,7 @@
  * SUCH DAMAGE.
  *
  * $Id: ng_btsocket.c,v 1.4 2003/09/14 23:29:06 max Exp $
- * $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netgraph/bluetooth/socket/ng_btsocket.c,v 1.10 2005/01/07 01:45:44 imp Exp $
+ * $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/netgraph/bluetooth/socket/ng_btsocket.c,v 1.11 2005/04/06 20:54:05 emax Exp $
  */
 
 #include <sys/param.h>
@@ -182,7 +182,7 @@ static struct protosw		ng_btsocket_proto
 	SOCK_STREAM,			/* protocol type */
 	&ng_btsocket_domain,		/* backpointer to domain */
 	BLUETOOTH_PROTO_RFCOMM,		/* protocol */
-	PR_ATOMIC | PR_CONNREQUIRED,	/* flags */
+	PR_CONNREQUIRED,		/* flags */
 	NULL, NULL, NULL,		/* input, output, ctlinput */
 	ng_btsocket_rfcomm_ctloutput,	/* ctloutput */
 	NULL,				/* ousrreq() */

--------------040300090805040104050607--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4254558C.1020708>