summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Jeremy <peterjeremy@acm.org>2012-02-27 20:46:29 +1100
committerAlan Coopersmith <alan.coopersmith@oracle.com>2012-07-08 11:16:13 -0700
commitc328376384a64f6dbdc476a1d6c5244aad8261ec (patch)
tree7c594debd3d34b2c52c44b4b5bc562dffd50bb41
parentb21c6c52bb8109329d7eb63072f8ebf41a42a7f9 (diff)
Bug 46691 - xscope-1.3.1 deadlocks if client or server would block
https://bugs.freedesktop.org/show_bug.cgi?id=46691 Use correct write FD to select() on. FlushFD() contains logic to handle the Xclient or Xserver blocking on a write() by changing the global read and write fd_set's so that MainLoop() will select() on the blocking write FD instead of the peer read FD. Unfortunately, the code contains a logic error so that it winds up select()ing for write on the peer FD instead of the blocked FD. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--scope.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scope.c b/scope.c
index 9b0ddf9..e665255 100644
--- a/scope.c
+++ b/scope.c
@@ -1134,7 +1134,7 @@ FlushFD (
FD_SET(PeerFD, &BlockedReadDescriptors);
}
if (FDinfo[fd].buflimit != FDinfo[fd].bufdelivered) {
- FD_SET(PeerFD, &WriteDescriptors);
+ FD_SET(fd, &WriteDescriptors);
}
}
}