mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-08 16:35:40 +00:00
fix index comparison
Original commit message from CVS: fix index comparison
This commit is contained in:
parent
aaeaa1efec
commit
bda2761348
3 changed files with 15 additions and 5 deletions
10
ChangeLog
10
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>
|
2004-08-16 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* gst/tcp/gstfdset.c: (ensure_size), (gst_fdset_new),
|
* 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_has_closed), (gst_fdset_fd_has_error),
|
||||||
(gst_fdset_fd_can_read), (gst_fdset_fd_can_write),
|
(gst_fdset_fd_can_read), (gst_fdset_fd_can_write),
|
||||||
(gst_fdset_wait):
|
(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>
|
2004-08-16 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
|
|
@ -286,7 +286,7 @@ gst_fdset_fd_has_closed (GstFDSet * set, GstFD * fd)
|
||||||
{
|
{
|
||||||
gint idx = fd->idx;
|
gint idx = fd->idx;
|
||||||
|
|
||||||
if (idx > 0)
|
if (idx >= 0)
|
||||||
res = (set->testpollfds[idx].revents & POLLHUP) != 0;
|
res = (set->testpollfds[idx].revents & POLLHUP) != 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -309,7 +309,7 @@ gst_fdset_fd_has_error (GstFDSet * set, GstFD * fd)
|
||||||
{
|
{
|
||||||
gint idx = fd->idx;
|
gint idx = fd->idx;
|
||||||
|
|
||||||
if (idx > 0)
|
if (idx >= 0)
|
||||||
res = (set->testpollfds[idx].revents & (POLLERR | POLLNVAL)) != 0;
|
res = (set->testpollfds[idx].revents & (POLLERR | POLLNVAL)) != 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -332,7 +332,7 @@ gst_fdset_fd_can_read (GstFDSet * set, GstFD * fd)
|
||||||
{
|
{
|
||||||
gint idx = fd->idx;
|
gint idx = fd->idx;
|
||||||
|
|
||||||
if (idx > 0)
|
if (idx >= 0)
|
||||||
res = (set->testpollfds[idx].revents & (POLLIN | POLLPRI)) != 0;
|
res = (set->testpollfds[idx].revents & (POLLIN | POLLPRI)) != 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -355,7 +355,7 @@ gst_fdset_fd_can_write (GstFDSet * set, GstFD * fd)
|
||||||
{
|
{
|
||||||
gint idx = fd->idx;
|
gint idx = fd->idx;
|
||||||
|
|
||||||
if (idx > 0)
|
if (idx >= 0)
|
||||||
res = (set->testpollfds[idx].revents & POLLOUT) != 0;
|
res = (set->testpollfds[idx].revents & POLLOUT) != 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1032,7 +1032,7 @@ gst_multifdsink_queue_buffer (GstMultiFdSink * sink, GstBuffer * buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle the clients. Basically does a blocking select for one
|
/* 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.
|
* filedescriptor to receive commands on that we need to check.
|
||||||
*
|
*
|
||||||
* After going out of the select call, we read and write to all
|
* After going out of the select call, we read and write to all
|
||||||
|
|
Loading…
Reference in a new issue