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.

(cherry picked from commit 59a3d85dd2)
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
This commit is contained in:
Thomas Guillem 2022-03-02 16:40:54 +01:00
parent 5834265562
commit 4063c515ea
1 changed files with 2 additions and 2 deletions

View File

@ -214,11 +214,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;
}