Thread (3 messages) 3 messages, 2 authors, 2010-09-28

Re: How to send stream via obexd without ending request

From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Date: 2010-09-28 13:06:22

Hi,

On Tue, Sep 28, 2010 at 2:25 PM, Luiz Augusto von Dentz
[off-list ref] wrote:
Hi Lukasz,

On Tue, Sep 28, 2010 at 1:14 PM, Lukasz Pawlik
[off-list ref] wrote:
quoted
Hi,

I want to stream data immediately after they appear and wait for next part.
So far I didn't manage to find a way how to do this properly. Returning
error EAGAIN from my read function leads to canceling request and this is
something I don't want to do. The other way I was able to find is returning
value > 0 from read function until last part of data appear. Obexd will
stream data when buffer exceed allocated memory chunk and return to read
more data. This is no solution because it forces obexd to send empty
streams. Does anyone knows how to solve this problem ?
You should probably handle -EAGAIN to handle_async_io in src/obex.c,
so that it doesn't cancel the request for this specific error, also it
should return TRUE so that the callback doesn't get automatically
unregistered.
Actually this doesn't work, if we do fetch all the data in a single
query than a lot of memory is already allocated for that, in
DBusMessage, so this only fix the extra buffer for translating tracker
contacts to vcards, so we probably need to fix the way we fetch the
data from tracker before changing anything in core. Also it is good to
notice that read takes the amount of data available in core buffer,
which is probably what is left to fill a packet, so when the driver
asks to resume it is suppose to to have enough data to fill that or it
is the end of the stream.

-- 
Luiz Augusto von Dentz
Computer Engineer
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help