Opened 13 years ago

Last modified 6 years ago

#309 new defect

async_data_read_finalize returns EOK even with NULL data and nonzero size

Reported by: Radim Vansa Owned by: Jakub Jermář
Priority: minor Milestone:
Component: helenos/lib/c Version: mainline
Keywords: async, errno, first-patch Cc:
Blocker for: Depends on:
See also:


The function async_data_read_finalize returns EOK even with NULL data and nonzero data size argument - I think in this case it should return EINVAL or EPERM.
On the other side the async_data_read_start gets EPERM error even if it has provided correct argument, maybe there should be another errno (saying that the other side has behaved in a wrong way).

Or, at least, state in the documentation that the EPERM means second side's error.

Change History (5)

comment:1 by Jakub Jermář, 12 years ago


comment:2 by Vojtech Horky, 10 years ago

Keywords: first-patch added

comment:3 by Jakub Jermář, 10 years ago


comment:4 by Jakub Jermář, 6 years ago

Milestone: 0.7.1

comment:5 by Jakub Jermář, 6 years ago

When this happens, it is already too late for the async_data_read_finalize() to abort the answer, so the original sender gets the error code as the return value. What we could do is to change the API to separate the return value returned by the callee from the error code returned by async_data_read_start (and functions it calls) itself.

Note: See TracTickets for help on using tickets.