Recent bluetooth problems

Maksim Yevmenkin maksim.yevmenkin at savvis.net
Wed Apr 6 14:33:21 PDT 2005


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
-------------- next part --------------
===================================================================
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() */


More information about the freebsd-bluetooth mailing list