[vlc-devel] [PATCH] dsm: add missing I/O error handling
Rémi Denis-Courmont
remi at remlab.net
Mon Feb 24 10:03:48 CET 2020
-1 means EAGAIN and 0 means EOF here. Fatal errors should return zero (and write to log).
Though I don't know if DSM guarantees proper errno values.
Le 24 février 2020 10:46:51 GMT+02:00, Thomas Guillem <thomas at gllm.fr> a écrit :
>
>
>On Fri, Feb 21, 2020, at 21:04, Janboe Ye wrote:
>> From 7bba85e4f3a01b5afaa624e52c7534580f840f77 Mon Sep 17 00:00:00
>2001
>> From: Janboe Ye <janboe.ye at outlook.com>
>> Date: Sat, 22 Feb 2020 04:00:39 +0800
>> Subject: [PATCH] dsm: add missing I/O error handling
>>
>> Signed-off-by: Janboe Ye <janboe.ye at outlook.com>
>> ---
>> modules/access/dsm/access.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/modules/access/dsm/access.c
>b/modules/access/dsm/access.c
>> index 69f61b9860..795872092e 100644
>> --- a/modules/access/dsm/access.c
>> +++ b/modules/access/dsm/access.c
>> @@ -523,6 +523,8 @@ static ssize_t Read( stream_t *p_access, void
>> *p_buffer, size_t i_len )
>> if( i_read < 0 )
>> {
>> msg_Err( p_access, "read failed" );
>> + if (errno != EINTR && errno != EAGAIN)
>
>It is not the contrary ?
>EINTR or EAGAIN should not be treated as error, right ?
>
>> + return 0;
>> return -1;
>> }
>>
>> --
>> 2.23.0
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel
--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200224/01644f3a/attachment.html>
More information about the vlc-devel
mailing list