Ticket #3 (closed defect: fixed)
Custom transport fails when insufficient bytes read
| Reported by: | a_villacis | Owned by: | somebody |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | openobex-lib | Version: | |
| Keywords: | Cc: |
Description
This patch fixes a (IMHO) serious bug in the custom transport. If the custom transport read an insufficient (but still nonzero) number of bytes at a time, the read routine at lib/obex_main.c can enter a situation in which the first instance of /* Check if we are still connected */ consumes all the available bytes, and the second instance sees an empty buffer, which it (incorrectly) interprets as an EOF, thus triggering OBEX_EV_LINKERR. This bug prevents obex_test from correctly sending or receiving objects when using the custom (serial) transport when the custom transport fails to feed big enough chunks.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
