From: Sybren Stuvel <sybren@thirdtower.com>
To: bluez-devel@lists.sourceforge.net
Subject: [Bluez-devel] rfcomm patch
Date: Wed, 5 Nov 2003 09:45:20 +0100 [thread overview]
Message-ID: <200311050945.34166.sybren@thirdtower.com> (raw)
[-- 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 --]
next reply other threads:[~2003-11-05 8:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-05 8:45 Sybren Stuvel [this message]
2003-11-05 10:16 ` [Bluez-devel] rfcomm patch 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
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=200311050945.34166.sybren@thirdtower.com \
--to=sybren@thirdtower.com \
--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.