mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-03 01:02:19 +00:00
we don't distinguish between closing because of errors and normal (yet)
Original commit message from CVS: we don't distinguish between closing because of errors and normal (yet)
This commit is contained in:
parent
91d11fc8dd
commit
26141ac67e
1 changed files with 7 additions and 7 deletions
|
@ -920,7 +920,7 @@ gst_multifdsink_handle_clients (GstMultiFdSink * sink)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
fd_set testreadfds, testwritefds;
|
fd_set testreadfds, testwritefds;
|
||||||
GList *clients, *error = NULL;
|
GList *clients, *closed = NULL;
|
||||||
gboolean try_again;
|
gboolean try_again;
|
||||||
GstMultiFdSinkClass *fclass;
|
GstMultiFdSinkClass *fclass;
|
||||||
|
|
||||||
|
@ -1031,7 +1031,7 @@ gst_multifdsink_handle_clients (GstMultiFdSink * sink)
|
||||||
|
|
||||||
client = (GstTCPClient *) clients->data;
|
client = (GstTCPClient *) clients->data;
|
||||||
if (client->bad) {
|
if (client->bad) {
|
||||||
error = g_list_prepend (error, client);
|
closed = g_list_prepend (closed, client);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1040,29 +1040,29 @@ gst_multifdsink_handle_clients (GstMultiFdSink * sink)
|
||||||
if (FD_ISSET (fd, &testreadfds)) {
|
if (FD_ISSET (fd, &testreadfds)) {
|
||||||
/* handle client read */
|
/* handle client read */
|
||||||
if (!gst_multifdsink_handle_client_read (sink, client)) {
|
if (!gst_multifdsink_handle_client_read (sink, client)) {
|
||||||
error = g_list_prepend (error, client);
|
closed = g_list_prepend (closed, client);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (FD_ISSET (fd, &testwritefds)) {
|
if (FD_ISSET (fd, &testwritefds)) {
|
||||||
/* handle client write */
|
/* handle client write */
|
||||||
if (!gst_multifdsink_handle_client_write (sink, client)) {
|
if (!gst_multifdsink_handle_client_write (sink, client)) {
|
||||||
error = g_list_prepend (error, client);
|
closed = g_list_prepend (closed, client);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* remove crappy clients */
|
/* remove crappy clients */
|
||||||
for (clients = error; clients; clients = g_list_next (clients)) {
|
for (clients = closed; clients; clients = g_list_next (clients)) {
|
||||||
GstTCPClient *client;
|
GstTCPClient *client;
|
||||||
|
|
||||||
client = (GstTCPClient *) clients->data;
|
client = (GstTCPClient *) clients->data;
|
||||||
|
|
||||||
GST_WARNING_OBJECT (sink, "removing client %p with fd %d with errors",
|
GST_DEBUG_OBJECT (sink, "removing client %p with fd %d because of close",
|
||||||
client, client->fd);
|
client, client->fd);
|
||||||
gst_multifdsink_client_remove (sink, client);
|
gst_multifdsink_client_remove (sink, client);
|
||||||
}
|
}
|
||||||
g_list_free (error);
|
g_list_free (closed);
|
||||||
g_mutex_unlock (sink->clientslock);
|
g_mutex_unlock (sink->clientslock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue