[vlc-devel] commit: net_Read: cancel-safety ( Rémi Denis-Courmont )
git version control
git at videolan.org
Thu Nov 27 18:13:40 CET 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Thu Nov 27 18:52:48 2008 +0200| [031dd3fed7f444acd1855b49a4b545666b38de82] | committer: Rémi Denis-Courmont
net_Read: cancel-safety
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=031dd3fed7f444acd1855b49a4b545666b38de82
---
src/network/io.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/network/io.c b/src/network/io.c
index ed069b3..edf6a63 100644
--- a/src/network/io.c
+++ b/src/network/io.c
@@ -281,7 +281,7 @@ int *net_Listen (vlc_object_t *p_this, const char *psz_host,
/*****************************************************************************
* __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
* data; in that case, a short count means EOF has been reached or the VLC
* object has been signaled.
@@ -343,7 +343,9 @@ __net_Read (vlc_object_t *restrict p_this, int fd, const v_socket_t *vs,
ssize_t n;
if (vs != NULL)
{
+ int canc = vlc_savecancel ();
n = vs->pf_recv (vs->p_sys, p_buf, i_buflen);
+ canc = vlc_restorecancel (canc);
}
else
{
More information about the vlc-devel
mailing list