From: Florian Echtler <echtler@fs.tum.de>
To: Brad Midgley <bmidgley@xmission.com>
Cc: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] Re: some btsco hacks
Date: Tue, 10 May 2005 00:14:38 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.63.0505100012240.9768@block> (raw)
In-Reply-To: <427EF21A.7040908@xmission.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 962 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> > Back references to what/where?
> backrefs are parts of the regexp surrounded by (). the matching expression is
> remembered and can be placed in the command string, by \0 \1 etc it turns out.
> I figured them out & noted in the docs.
Ah, I see - I had overlooked that part of the code.
> In keeping with \0 \1 for backrefs in the regexp and \p for pid, the headset
> state should be \s instead of %d. Would you be willing to make that change (or
> I could)?
No problem, see attached patch.
Another question: has anyone experienced the same problem as I have
(the microphone input sometimes generates only noise) or is that
strictly a bug of my headset?
Yours, Florian
- --
Preserve wildlife - pickle a squirrel today!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFCf+DS7CzyshGvatgRAmBVAKDfFJndw9pvwYxeENUCDj7gVyTLhwCfXBBS
LXVG5Iht3y0zFJp7REc3VeE=
=r6pM
-----END PGP SIGNATURE-----
[-- Attachment #2: Type: TEXT/PLAIN, Size: 1035 bytes --]
diff -u -r1.25 btsco.c
--- btsco.c 9 May 2005 04:57:29 -0000 1.25
+++ btsco.c 9 May 2005 22:11:43 -0000
@@ -713,10 +713,7 @@
int substl = 0;
subst = NULL;
-
- // add the current sco mode to the command string
- sysbuf = malloc(strlen(args)+1);
- sprintf(sysbuf,args,sco_mode);
+ sysbuf = strdup(args);
for(i = 0; sysbuf[i]; i++) {
if((sysbuf[i] == '\\') && (sysbuf[i + 1] >= '0') && (sysbuf[i + 1] <= '9')) {
@@ -730,6 +727,10 @@
subst = malloc(11); /* For potentially 32-bit PIDs */
substl = snprintf(subst, 11, "%i", getpid());
}
+ if((sysbuf[i] == '\\') && (sysbuf[i + 1] == 's')) {
+ subst = malloc(11); /* same as above, for SCO mode */
+ substl = snprintf(subst, 11, "%d", sco_mode);
+ }
if(subst != NULL) {
sysbuf = realloc(sysbuf, strlen(sysbuf) + substl - 1);
memmove(sysbuf + i + substl, sysbuf + i + 2, strlen(sysbuf) - i - 1);
next prev parent reply other threads:[~2005-05-09 22:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-05 18:58 [Bluez-devel] some btsco hacks Florian Echtler
2005-05-05 21:09 ` [Bluez-devel] " Brad Midgley
2005-05-06 20:52 ` Florian Echtler
2005-05-09 5:16 ` Brad Midgley
2005-05-09 22:14 ` Florian Echtler [this message]
2005-05-09 23:11 ` Brad Midgley
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=Pine.LNX.4.63.0505100012240.9768@block \
--to=echtler@fs.tum.de \
--cc=bluez-devel@lists.sourceforge.net \
--cc=bmidgley@xmission.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox