Commit 031dd3fe authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

net_Read: cancel-safety

parent 7fda9d77
...@@ -281,7 +281,7 @@ int *net_Listen (vlc_object_t *p_this, const char *psz_host, ...@@ -281,7 +281,7 @@ int *net_Listen (vlc_object_t *p_this, const char *psz_host,
/***************************************************************************** /*****************************************************************************
* __net_Read: * __net_Read:
***************************************************************************** *****************************************************************************
* Reads from a network socket. * Reads from a network socket. Cancellation point.
* If waitall is true, then we repeat until we have read the right amount of * If waitall is true, then we repeat until we have read the right amount of
* data; in that case, a short count means EOF has been reached or the VLC * data; in that case, a short count means EOF has been reached or the VLC
* object has been signaled. * object has been signaled.
...@@ -343,7 +343,9 @@ __net_Read (vlc_object_t *restrict p_this, int fd, const v_socket_t *vs, ...@@ -343,7 +343,9 @@ __net_Read (vlc_object_t *restrict p_this, int fd, const v_socket_t *vs,
ssize_t n; ssize_t n;
if (vs != NULL) if (vs != NULL)
{ {
int canc = vlc_savecancel ();
n = vs->pf_recv (vs->p_sys, p_buf, i_buflen); n = vs->pf_recv (vs->p_sys, p_buf, i_buflen);
canc = vlc_restorecancel (canc);
} }
else else
{ {
......
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