]> source.dussan.org Git - tigervnc.git/commitdiff
Added missing part of write block handler. 29/head
authorTim Waugh <twaugh@redhat.com>
Tue, 9 Sep 2014 13:40:17 +0000 (14:40 +0100)
committerTim Waugh <twaugh@redhat.com>
Tue, 9 Sep 2014 13:40:17 +0000 (14:40 +0100)
https://bugzilla.redhat.com/show_bug.cgi?id=1137023

unix/xserver116.patch

index aeeb5c7086ccbd6451ab52450deef84538453d89..d870ef7a43a2624cd2905089b2803483534693e5 100644 (file)
@@ -113,3 +113,25 @@ diff -up xorg-server-1.16.0/os/WaitFor.c.vnc xorg-server-1.16.0/os/WaitFor.c
          BlockHandler((void *) &wt, (void *) &LastSelectMask);
          if (NewOutputPending)
              FlushAllOutput();
+@@ -223,10 +223,20 @@ WaitForSomething(int *pClientsReady)
+             i = Select(MaxClients, &LastSelectMask, &clientsWritable, NULL, wt);
+         }
+         else {
+-            i = Select(MaxClients, &LastSelectMask, NULL, NULL, wt);
++          if (AnyClientsWriteBlocked)
++              XFD_ORSET(&socketsWritable, &ClientsWriteBlocked, &socketsWritable);
++
++          if (XFD_ANYSET(&socketsWritable)) {
++              i = Select(MaxClients, &LastSelectMask, &socketsWritable, NULL, wt);
++              if (AnyClientsWriteBlocked)
++                  XFD_ANDSET(&clientsWritable, &socketsWritable, &ClientsWriteBlocked);
++          } else {
++              i = Select(MaxClients, &LastSelectMask, NULL, NULL, wt);
++          }
+         }
+         selecterr = GetErrno();
+         WakeupHandler(i, (void *) &LastSelectMask);
++      vncWriteWakeupHandler(i, &socketsWritable);
+         if (i <= 0) {           /* An error or timeout occurred */
+             if (dispatchException)
+                 return 0;