]> git.sesse.net Git - vlc/blobdiff - modules/control/netsync.c
dbus: Implement the MPRIS Raise method for the Qt interface
[vlc] / modules / control / netsync.c
index 4a358ccaf0d0cd1645c34225e18ca9a803c6ff93..6db3c344d0109231ba9cdceadd59f6547c10bfc1 100644 (file)
@@ -73,7 +73,7 @@ vlc_module_begin()
     set_category(CAT_ADVANCED)
     set_subcategory(SUBCAT_ADVANCED_MISC)
 
-    add_bool("netsync-master", false, NULL,
+    add_bool("netsync-master", false,
               NETSYNC_TEXT, NETSYNC_LONGTEXT, true)
     add_string("netsync-master-ip", NULL, MIP_TEXT, MIP_LONGTEXT,
                 true)
@@ -180,7 +180,7 @@ static void *Master(void *handle)
         struct pollfd ufd = { .fd = sys->fd, .events = POLLIN, };
         uint64_t data[2];
 
-        if (poll(&ufd, 1, -1) <= 0)
+        if (poll(&ufd, 1, -1) < 0)
             continue;
 
         /* We received something */
@@ -232,11 +232,8 @@ static void *Slave(void *handle)
             goto wait;
 
         /* Don't block */
-        int ret = poll(&ufd, 1, sys->timeout);
-        if (ret == 0)
+        if (poll(&ufd, 1, sys->timeout) <= 0)
             continue;
-        if (ret < 0)
-            goto wait;
 
         const mtime_t receive_date = mdate();
         if (recv(sys->fd, data, sizeof(data), 0) <= 0)