From: Mayank Batra <mayankbatra@yahoo.co.in>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] Regarding a2recv
Date: Tue, 10 May 2005 08:20:05 +0100 (BST) [thread overview]
Message-ID: <20050510072005.75813.qmail@web8301.mail.in.yahoo.com> (raw)
In-Reply-To: <20050509005413.3787d2d7.henryk@ploetzli.ch>
Henryk,
> I now completely restructured the a2recv code into
> something that more
> closely resembles a socket server application.
> Basically it is now a
> giant endless loop that is blocking in select() on
> the serverfd and
> optionally the cmdfd and streamfd (should they be
> open) and as soon as
> there is data to read or a connection to accept I am
> reading it.
Good job!
> There is also an internal state like that from the
> AVDTP spec and I'm
> treating incoming packets based on that state. This
> will allow any
> sequence of AVDTP_DISCOVER, AVDTP_GET_CAPABILITIES,
> AVDTP_OPEN, etc.
> commands to occur and also makes it possible to have
> the server handle
> more than one connection during its lifetime (only
> one at a time, of
> course).
> The code is currently completely lacking any error
> handling, and simply
> ignores the offending packet (or exits), so that
> should be added. I also
> don't like the structs used for the avdtp signalling
> packets, I think
> there should only be one struct that includes a
> struct avdtp_header and
> a union with all the other optional signalling
> contents. Then there
> would have to be specialised read()/write()
> functions which figure out
> (based on the header) how long the packet actually
> is and automatically
> send/receive that many bytes. However, that would
> also require
> modification of a2play so I thought I'd ask first.
>
> That would make it easier to send rejection messages
> (which may differ
> from the acceptance message in length) and do proper
> error handling.
Even I tested a2recv with a2play and BlueSoleil.
It was working without much trouble, that is why I
didn't bother much about the error handling part.
What I needed at that time was a quick fix solution to
make an A2DP sink.
>
> Again, please check that I didn't break your
> devices. I can only test
> with a2play. There might also still be some flaws in
> the state handling
> since this is slightly more complex than the
> original straight linear
> design.
Well, I haven't tested the restructured code yet. But
the one before this one was working fine.
Mayank
________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
prev parent reply other threads:[~2005-05-10 7:20 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
2005-05-09 21:31 ` Brad Midgley
2005-05-10 7:20 ` Mayank Batra [this message]
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=20050510072005.75813.qmail@web8301.mail.in.yahoo.com \
--to=mayankbatra@yahoo.co.in \
--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.