[vlc-devel] commit: udev: preempt cancellation ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Oct 18 13:47:36 CEST 2009


vlc | branch: 1.0-bugfix | Rémi Denis-Courmont <remi at remlab.net> | Sat Oct 17 17:59:09 2009 +0300| [9697e595b5fa2f512bd35571915a80536b27feab] | committer: Rémi Denis-Courmont 

udev: preempt cancellation
(cherry picked from commit da8ac5627f3cc9a99a9b8945ab71107843afd684)

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

 modules/services_discovery/udev.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/services_discovery/udev.c b/modules/services_discovery/udev.c
index 93e0857..14f6d04 100644
--- a/modules/services_discovery/udev.c
+++ b/modules/services_discovery/udev.c
@@ -280,6 +280,7 @@ static void *Run (void *data)
             if (errno != EINTR)
                 break;
 
+        int canc = vlc_savecancel ();
         struct udev_device *dev = udev_monitor_receive_device (mon);
         if (dev == NULL)
             continue;
@@ -295,6 +296,7 @@ static void *Run (void *data)
             AddDevice (sd, dev);
         }
         udev_device_unref (dev);
+        vlc_restorecancel (canc);
     }
     return NULL;
 }




More information about the vlc-devel mailing list