Hi, On Tue, Sep 28, 2010 at 2:25 PM, Luiz Augusto von Dentz <luiz.dentz@xxxxxxxxx> wrote: > Hi Lukasz, > > On Tue, Sep 28, 2010 at 1:14 PM, Lukasz Pawlik > <lukasz.pawlik@xxxxxxxxxxx> wrote: >> 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 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html