All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] rfcomm patch
@ 2003-11-05  8:45 Sybren Stuvel
  2003-11-05 10:16 ` Marcel Holtmann
  2003-11-05 15:50 ` Alan Huang
  0 siblings, 2 replies; 9+ messages in thread
From: Sybren Stuvel @ 2003-11-05  8:45 UTC (permalink / raw)
  To: bluez-devel


[-- Attachment #1.1: body text --]
[-- Type: text/plain, Size: 575 bytes --]

Hi there,

I've been working with bluetooth for a few months now, trying to let BlueZ (on 
my PC) talk to Affix (on my Zaurus). One difficulty is that rfcom doesn't 
flush it's stdout when a new (incoming and/or outgoing) connection has been 
made.

With the attached patch, scripts can use rfcomm to connect via bluetooth and 
fork() the process in order to start using the connection (ie. by running 
pppd over it).

Greetings,
Sybren Stuvel
-- 
(o_   Q: God, root, what is difference?
//\   A: God can change the byte order on the CPU, root can't.
V_/_


[-- Attachment #1.2: bluez-utils-2.3-rfcomm.patch --]
[-- Type: text/x-diff, Size: 992 bytes --]

--- work/bluez-utils-2.3/rfcomm/main.c-orig	2003-01-27 12:42:07.000000000 +0100
+++ work/bluez-utils-2.3/rfcomm/main.c	2003-11-04 17:33:13.000000000 +0100
@@ -339,6 +339,11 @@
 	printf("Connected %s to %s on channel %d\n", devname, dst, req.channel);
 	printf("Press CTRL-C for hangup\n");
 
+	/* Added by Sybren Stuvel <sybren AT thirdtower.com> - Flush
+	 * stdout so other scripts can benefit from rfcomm's output and
+	 * react to connections being made. */
+	fflush(stdout);
+
 	memset(&sa, 0, sizeof(sa));
 	sa.sa_flags   = SA_NOCLDSTOP;
 	sa.sa_handler = SIG_IGN;
@@ -443,6 +448,11 @@
 	printf("Connection from %s to %s\n", dst, devname);
 	printf("Press CTRL-C for hangup\n");
 
+	/* Added by Sybren Stuvel <sybren AT thirdtower.com> - Flush
+	 * stdout so other scripts can benefit from rfcomm's output and
+	 * react to connections being made. */
+	fflush(stdout);
+
 	memset(&sa, 0, sizeof(sa));
 	sa.sa_flags   = SA_NOCLDSTOP;
 	sa.sa_handler = SIG_IGN;

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2003-11-06 23:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-05  8:45 [Bluez-devel] rfcomm patch Sybren Stuvel
2003-11-05 10:16 ` Marcel Holtmann
2003-11-05 12:14   ` Sybren Stuvel
2003-11-05 12:22     ` Marcel Holtmann
2003-11-05 15:00     ` Sybren Stuvel
2003-11-05 15:50 ` Alan Huang
2003-11-06  8:39   ` Marcel Holtmann
2003-11-06 20:29     ` [Bluez-users] " Alan Huang
2003-11-06 23:44       ` Marcel Holtmann

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.