Commit 69d48f0f authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Comment on the EOF case - this does not change the semantic at all.

parent 60dcd8b9
......@@ -333,6 +333,14 @@ net_ReadInner (vlc_object_t *restrict p_this, unsigned fdc, const int *fdv,
#endif
}
if (n == 0)
/* For streams, this means end of file, and there will not be any
* further data ever on the stream. For datagram sockets, this
* means empty datagram, and there could be more data coming.
* However, it makes no sense to set <waitall> with datagrams.
*/
break; // EOF
if (n == -1)
{
#if defined(WIN32) || defined(UNDER_CE)
......@@ -367,7 +375,7 @@ net_ReadInner (vlc_object_t *restrict p_this, unsigned fdc, const int *fdv,
p_buf += n;
i_buflen -= n;
if ((n == 0) || !waitall)
if (!waitall)
break;
}
return i_total;
......
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