Commit eb06716a authored by conrad's avatar conrad

add OGGZ_ERR_IO_AGAIN handling

git-svn-id: http://svn.annodex.net/liboggz/trunk@530 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent 234bf466
......@@ -130,6 +130,9 @@ enum OggzError {
* before any input bytes were consumed */
OGGZ_ERR_READ_STOP_ERR = -15,
/** no data available from IO, try again */
OGGZ_ERR_IO_AGAIN = -16,
/** The requested serialno does not exist in this OGGZ */
OGGZ_ERR_BAD_SERIALNO = -20,
......
......@@ -380,6 +380,13 @@ oggz_read (OGGZ * oggz, long n)
/* Don't return 0 unless it's actually an EOF condition */
if (nread == 0) {
switch (bytes_read) {
case OGGZ_ERR_IO_AGAIN:
case OGGZ_ERR_SYSTEM:
return bytes_read; break;
default: break;
}
switch (cb_ret) {
case OGGZ_CONTINUE: case OGGZ_READ_EOF: return 0; break;
case OGGZ_STOP_ERR: return OGGZ_ERR_READ_STOP_ERR; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment