From: "Henryk Plötz" <henryk@ploetzli.ch>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] Regarding a2recv
Date: Mon, 9 May 2005 14:38:56 +0200 [thread overview]
Message-ID: <20050509143856.4a5437c7.henryk@ploetzli.ch> (raw)
In-Reply-To: <427EE734.4030303@xmission.com>
[-- Attachment #1: Type: text/plain, Size: 1659 bytes --]
Moin,
Am Sun, 08 May 2005 22:29:40 -0600 schrieb Brad Midgley:
> The only tricky part is the MAX_ADDITIONAL_CODEC stuff. Make sure we
> only try to send one codec when we're reporting our sink's
> capabilities and accept multiple codecs when we're reading
> capabilities.
Ugh, yes. It would be possible to simple address infos[] beyond the
borders that are set by 1 + MAX_ADDITIONAL_CODEC if it is made sure that
there is that much space assigned. (If I recall correctly that's a
common technique to get varying length fields in structs.) However, from
the header it is not clear how many capabilities there will be, which is
something I don't like. We would have to resort to an all-zero seid_info
or something like that to denote the end of the packet (the read
function must than insert that, and the write function would have to
send up to that border).
> Maybe what you're proposing will clean up the "optional" error codes
> in places like open_stream_rsp. The header would look different so
> you could distinguish the error codes and compute the size properly
> when sending.
That was exactly the idea.
> Be sure we accept the extended size with the error codes when
> receiving.
I'm not accustomed to bluetooth socket programming but I guess what I'm
doing currently (simply read() up to a maximum (mtu?) size, check the
returned size and optionally the header and cast the buffer to our
struct) is fine for that purpose.
--
Henryk Plötz
Grüße aus Berlin
~~~~~~~ Un-CDs, nein danke! http://www.heise.de/ct/cd-register/ ~~~~~~~
~ Help Microsoft fight software piracy: Give Linux to a friend today! ~
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2005-05-09 12:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-05 12:45 [Bluez-devel] Regarding a2recv Mayank Batra
2005-05-05 13:14 ` Marcel Holtmann
2005-05-05 14:40 ` Brad Midgley
2005-05-06 4:05 ` Henryk Plötz
2005-05-08 12:50 ` Mayank Batra
2005-05-08 22:54 ` Henryk Plötz
2005-05-09 0:01 ` Marcel Holtmann
2005-05-09 0:58 ` Henryk Plötz
2005-05-09 1:03 ` Marcel Holtmann
2005-05-09 1:35 ` Henryk Plötz
2005-05-09 1:44 ` Marcel Holtmann
2005-05-09 4:29 ` Brad Midgley
2005-05-09 12:48 ` Henryk Plötz
2005-05-09 12:58 ` Marcel Holtmann
2005-05-09 16:25 ` Brad Midgley
2005-05-09 4:29 ` Brad Midgley
2005-05-09 12:38 ` Henryk Plötz [this message]
2005-05-09 21:31 ` Brad Midgley
2005-05-10 7:20 ` Mayank Batra
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=20050509143856.4a5437c7.henryk@ploetzli.ch \
--to=henryk@ploetzli.ch \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox