From: Thomas Vander Stichele Date: Tue, 17 Aug 2004 09:57:31 +0000 (+0000) Subject: fix index comparison X-Git-Tag: 1.19.3~511^2~13810 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bda2761348bdc38e49f50d8060b65d107b9cbd13;p=platform%2Fupstream%2Fgstreamer.git fix index comparison Original commit message from CVS: fix index comparison --- diff --git a/ChangeLog b/ChangeLog index e226005..1b3c888 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-08-17 Thomas Vander Stichele + + patch by: Wim Taymans + + * gst/tcp/gstfdset.c: + * gst/tcp/gstmultifdsink.c: + fix index comparison, should include 0 + 2004-08-16 Wim Taymans * 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 diff --git a/gst/tcp/gstfdset.c b/gst/tcp/gstfdset.c index 12b5ae4..ebd10e1 100644 --- a/gst/tcp/gstfdset.c +++ b/gst/tcp/gstfdset.c @@ -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; } diff --git a/gst/tcp/gstmultifdsink.c b/gst/tcp/gstmultifdsink.c index 5b2936a..3a4a282 100644 --- a/gst/tcp/gstmultifdsink.c +++ b/gst/tcp/gstmultifdsink.c @@ -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