[vlc-commits] network: use vlc_killed()

Rémi Denis-Courmont git at videolan.org
Wed Jul 1 18:22:14 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jun 30 23:52:51 2015 +0300| [c881098b14e08caecc7b9c55990412baa2dc9498] | committer: Rémi Denis-Courmont

network: use vlc_killed()

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c881098b14e08caecc7b9c55990412baa2dc9498
---

 src/network/io.c  |    4 ++--
 src/network/tcp.c |    2 +-
 src/network/tls.c |    4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/network/io.c b/src/network/io.c
index c396592..20a01ad 100644
--- a/src/network/io.c
+++ b/src/network/io.c
@@ -237,7 +237,7 @@ ssize_t (net_Read)(vlc_object_t *restrict obj, int fd,
 
     do
     {
-        if (!vlc_object_alive(obj))
+        if (vlc_killed())
         {
             vlc_testcancel();
             errno = EINTR;
@@ -292,7 +292,7 @@ ssize_t (net_Write)(vlc_object_t *obj, int fd, const void *buf, size_t len)
 
     do
     {
-        if (!vlc_object_alive(obj))
+        if (vlc_killed())
         {
             vlc_testcancel();
             errno = EINTR;
diff --git a/src/network/tcp.c b/src/network/tcp.c
index 743350a..442edaf 100644
--- a/src/network/tcp.c
+++ b/src/network/tcp.c
@@ -167,7 +167,7 @@ int net_Connect( vlc_object_t *p_this, const char *psz_host, int i_port,
 
             do  /* NOTE: timeout screwed up if we catch a signal (EINTR) */
             {
-                if (!vlc_object_alive(p_this))
+                if (vlc_killed())
                     goto next_ai;
 
                 val = vlc_poll_i11e(&ufd, 1, timeout);
diff --git a/src/network/tls.c b/src/network/tls.c
index 77c8fbc..f3d297f 100644
--- a/src/network/tls.c
+++ b/src/network/tls.c
@@ -247,7 +247,7 @@ int vlc_tls_Read(vlc_tls_t *session, void *buf, size_t len, bool waitall)
 
     for (size_t rcvd = 0;;)
     {
-        if (!vlc_object_alive(session->p_parent))
+        if (vlc_killed())
         {
             errno = EINTR;
             return -1;
@@ -280,7 +280,7 @@ int vlc_tls_Write(vlc_tls_t *session, const void *buf, size_t len)
 
     for (size_t sent = 0;;)
     {
-        if (!vlc_object_alive(session->p_parent))
+        if (vlc_killed())
         {
             errno = EINTR;
             return -1;



More information about the vlc-commits mailing list