fix index comparison
authorThomas Vander Stichele <thomas@apestaart.org>
Tue, 17 Aug 2004 09:57:31 +0000 (09:57 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Tue, 17 Aug 2004 09:57:31 +0000 (09:57 +0000)
Original commit message from CVS:
fix index comparison

ChangeLog
gst/tcp/gstfdset.c
gst/tcp/gstmultifdsink.c

index e226005..1b3c888 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-08-17  Thomas Vander Stichele  <thomas at apestaart dot org>
+
+       patch by: Wim Taymans
+
+       * gst/tcp/gstfdset.c:
+       * gst/tcp/gstmultifdsink.c:
+         fix index comparison, should include 0
+
 2004-08-16  Wim Taymans  <wim@fluendo.com>
 
        * gst/tcp/gstfdset.c: (ensure_size), (gst_fdset_new),
@@ -5,6 +13,8 @@
        (gst_fdset_fd_has_closed), (gst_fdset_fd_has_error),
        (gst_fdset_fd_can_read), (gst_fdset_fd_can_write),
        (gst_fdset_wait):
+         copy when reallocing for poll so the select arguments don't get
+         changed during the call
 
 2004-08-16  Wim Taymans  <wim@fluendo.com>
 
index 12b5ae4..ebd10e1 100644 (file)
@@ -286,7 +286,7 @@ gst_fdset_fd_has_closed (GstFDSet * set, GstFD * fd)
     {
       gint idx = fd->idx;
 
-      if (idx > 0)
+      if (idx >= 0)
         res = (set->testpollfds[idx].revents & POLLHUP) != 0;
       break;
     }
@@ -309,7 +309,7 @@ gst_fdset_fd_has_error (GstFDSet * set, GstFD * fd)
     {
       gint idx = fd->idx;
 
-      if (idx > 0)
+      if (idx >= 0)
         res = (set->testpollfds[idx].revents & (POLLERR | POLLNVAL)) != 0;
       break;
     }
@@ -332,7 +332,7 @@ gst_fdset_fd_can_read (GstFDSet * set, GstFD * fd)
     {
       gint idx = fd->idx;
 
-      if (idx > 0)
+      if (idx >= 0)
         res = (set->testpollfds[idx].revents & (POLLIN | POLLPRI)) != 0;
       break;
     }
@@ -355,7 +355,7 @@ gst_fdset_fd_can_write (GstFDSet * set, GstFD * fd)
     {
       gint idx = fd->idx;
 
-      if (idx > 0)
+      if (idx >= 0)
         res = (set->testpollfds[idx].revents & POLLOUT) != 0;
       break;
     }
index 5b2936a..3a4a282 100644 (file)
@@ -1032,7 +1032,7 @@ gst_multifdsink_queue_buffer (GstMultiFdSink * sink, GstBuffer * buf)
 }
 
 /* Handle the clients. Basically does a blocking select for one
- * of the client fds to become read or writable. We also have a 
+ * of the client fds to become read or writable. We also have a
  * filedescriptor to receive commands on that we need to check.
  *
  * After going out of the select call, we read and write to all