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

git version control git at videolan.org
Sat Oct 17 16:59:22 CEST 2009


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

udev: preempt cancellation

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

 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