nfs: fix pf_read return values

0 should be returned in case of EOS or error, -1 means EAGAIN.

/me blames me for not reading the documentation.
This commit is contained in:
Thomas Guillem 2022-03-02 16:40:54 +01:00 committed by Jean-Baptiste Kempf
parent a377159162
commit 59a3d85dd2

View File

@ -213,11 +213,11 @@ FileRead(stream_t *p_access, void *p_buf, size_t i_len)
p_access) < 0)
{
msg_Err(p_access, "nfs_read_async failed");
return -1;
return 0;
}
if (vlc_nfs_mainloop(p_access, nfs_read_finished_cb) < 0)
return -1;
return 0;
return p_sys->res.read.i_len;
}