Fork us on GitHub Follow us on Google+ Follow us on Facebook Follow us on Twitter

Opened 7 years ago

Last modified 5 months 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:

Description

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 Changed 6 years ago by Jakub Jermář

Milestone: 0.5.00.5.1

comment:2 Changed 4 years ago by Vojtech Horky

Keywords: first-patch added

comment:3 Changed 4 years ago by Jakub Jermář

Milestone: 0.6.00.7.1

comment:4 Changed 6 months ago by Jakub Jermář

Milestone: 0.7.1

comment:5 Changed 5 months ago by Jakub Jermář

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.