Parent: 3fbffebe5709e9a9b1136b9da0ddb91abd7a3c72
Author: Slawomir Bochenski <lkslawek@gmail.com>
Committer: Marcel Holtmann <marcel@holtmann.org>
Date: 2012-12-04 23:48:43
Tree: 80b995ce2c6e4177178da17f8b897dcc8f7b29fd
obexd: Fix handling asynchronous plugin reads Calling OBEX_ResumeRequest() from handle_async_io() may result in direct calling obex_event_cb() (this happens when obex_write_stream() will deliver not enough bytes to fully fill OpenOBEX TX packet). In this case set_io_watch will fail if handle_async_io() is called from obex_object_set_io_flags(), because the watch is already installed. Originally when code returns from OBEX_ResumeRequest(), handle_async_io() returns FALSE which makes obex_object_set_io_flags() remove this watch. This patch adds variable for tracking whether subsequent calls suspended get request, causing obex_object_set_io_flags() remove the watch only when the request is not suspended. Additionaly member 'streaming' of obex_session has been renamed to 'stream_open'.
Diffstat
| M | obexd/src/obex-priv.h | | | 3 | ++- |
| M | obexd/src/obex.c | | | 14 | +++++++++- - - - - |
2 files changed, 11 insertions(+), 6 deletions(-)