[vlc-commits] [Git][videolan/vlc][3.0.x] 2 commits: nfs: fix pf_read return values
Thomas Guillem (@tguillem)
gitlab at videolan.org
Tue Mar 8 09:10:57 UTC 2022
Thomas Guillem pushed to branch 3.0.x at VideoLAN / VLC
Commits:
4063c515 by Thomas Guillem at 2022-03-07T09:20:04+01:00
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 59a3d85dd2bf642a81c95f91ef320cf4164d5671)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
- - - - -
8bff7178 by Thomas Guillem at 2022-03-07T09:21:03+01:00
smb2: 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 249a76b921b1a742ae9d4fa459ea7107bca08482)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
- - - - -
2 changed files:
- modules/access/nfs.c
- modules/access/smb2.c
Changes:
=====================================
modules/access/nfs.c
=====================================
@@ -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;
}
=====================================
modules/access/smb2.c
=====================================
@@ -283,10 +283,7 @@ FileRead(stream_t *access, void *buf, size_t len)
{
struct access_sys *sys = access->p_sys;
- if (sys->error_status != 0)
- return -1;
-
- if (sys->eof)
+ if (sys->eof || sys->error_status != 0)
return 0;
/* Limit the read size since smb2_read_async() will complete only after
@@ -300,11 +297,11 @@ FileRead(stream_t *access, void *buf, size_t len)
smb2_read_cb, access) < 0)
{
VLC_SMB2_SET_ERROR(access, "smb2_read_async", 1);
- return -1;
+ return 0;
}
if (vlc_smb2_mainloop(access, false) < 0)
- return -1;
+ return 0;
return sys->res.read.len;
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/583426556280120843d8de5d5986663a3b43568f...8bff7178c720dd0c4df56a8dc34bd86fac7801e8
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/583426556280120843d8de5d5986663a3b43568f...8bff7178c720dd0c4df56a8dc34bd86fac7801e8
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list