mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
gst/tcp/gsttcpserversink.c: Zero some variables first (need for accept not to return EINVAL)
Original commit message from CVS: 2004-10-21 Zaheer Abbas Merali <zaheerabbas at merali dot org> * gst/tcp/gsttcpserversink.c: (gst_tcpserversink_handle_server_read), (gst_tcpserversink_init_send): Zero some variables first (need for accept not to return EINVAL)
This commit is contained in:
parent
f76c0b9bd7
commit
345756ed9d
2 changed files with 14 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
2004-10-21 Zaheer Abbas Merali <zaheerabbas at merali dot org>
|
||||
|
||||
* gst/tcp/gsttcpserversink.c:
|
||||
(gst_tcpserversink_handle_server_read),
|
||||
(gst_tcpserversink_init_send):
|
||||
Zero some variables first (need for accept not to return EINVAL)
|
||||
|
||||
2004-10-20 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* ext/ogg/gstoggdemux.c: (gst_ogg_demux_src_query),
|
||||
|
|
|
@ -157,12 +157,18 @@ gst_tcpserversink_handle_server_read (GstTCPServerSink * sink)
|
|||
struct sockaddr_in client_address;
|
||||
int client_address_len;
|
||||
|
||||
/* For some stupid reason, client_address and client_address_len has to be
|
||||
* zeroed */
|
||||
memset (&client_address, 0, sizeof (client_address));
|
||||
client_address_len = 0;
|
||||
|
||||
client_sock_fd =
|
||||
accept (sink->server_sock.fd, (struct sockaddr *) &client_address,
|
||||
&client_address_len);
|
||||
if (client_sock_fd == -1) {
|
||||
GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE, (NULL),
|
||||
("Could not accept client on server socket: %s", g_strerror (errno)));
|
||||
("Could not accept client on server socket %d: %s (%d)",
|
||||
sink->server_sock.fd, g_strerror (errno), errno));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue