search for: sock_error

Displaying 13 results from an estimated 13 matches for "sock_error".

2004 Aug 06
2
improved error.log output --diff
...- WARN0("Had to close a listening socket"); + WARN0("Had to close a listening socket, %s", "-"); } global.serversock[i] = -1; } @@ -229,7 +229,7 @@ } if (!sock_recoverable(sock_error())) - WARN2("accept() failed with error %d: %s", sock_error(), strerror(sock_error())); + WARN2("accept() failed with error %d: %s, %s", sock_error(), strerror(sock_error()), "-"); free(ip); @@ -415,7 +415,7 @@ */ global_lock();...
2009 Jul 06
1
Nonblocking connect is not proprly checked in poll implementation
.... Patch follows. -- Petr Index: src/net/sock.c =================================================================== --- src/net/sock.c (revision 16208) +++ src/net/sock.c (working copy) @@ -516,17 +516,27 @@ int sock_connected (sock_t sock, int timeout) { struct pollfd check; + int val = SOCK_ERROR; + socklen_t size = sizeof val; check.fd = sock; check.events = POLLOUT; switch (poll (&check, 1, timeout*1000)) { case 0: return SOCK_TIMEOUT; + default: + /* on windows getsockopt.val is defined as char* */ + if (getsockopt(sock,...
2004 Aug 06
2
ICECAST enseirb group
...e circularly linked list > > : the accesses and insertions would be faster (constant!). Are we wrong ? If > > yes, why ? > > > > ---------------------------------------- > > > > In sock_write_bytes(), there is a "sanity check" which can return > > SOCK_ERROR. If this happens, there can be a problem in the calling function > > because this one will then verify the kind of return using > > sock_recoverable(sock_error()). And sock_error() will return something wrong > > because of errno or WSAGetLastError() are not concerned by the retur...
2004 Aug 06
2
PATCH: increase network congestion resilience (SOLVED!)
...d handling it Goddam!!!! There were bugs in icecast2 while checking for recoverable error (in several places indeed). The program was checking for sock_recoverable() with the return value of send(), which is a mistake and confused me because I assumed it was right. It _must_ be done against with sock_error() instead. Find the patch that solves the bugs. - -- ricardo galli GPG id C8114D34 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+KUOLXZ2eFsgRTTQRAvtQAKDWnOoK5hNv1ilzuxVJJStE5KJgsQCfRFHC cRtvQvDZElEoGSXzdp2J/d8= =bQZY -----END PGP SIGNATURE----- -------------- n...
2004 Aug 06
3
PATCH: increase network congestion resilience
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, find a patch which is an update to a patch sent months ago. Before it was in net/sock.c, now I moved it to format.c, so net CVS module is not affected. It polls the socket before trying to send() any byte to check if the TCP buffers are full due to network congestion. See below the warning messages of "normal" (at least in
2004 Aug 06
2
Re: PATCH: increase network congestion resilience
...;sock, &abuf->data[client->pos], bytes); + if (sbytes > 0) { + client->con->sent_bytes += sbytes; + client->last_sent = now; + } + if (sbytes < bytes) { + if (sbytes < 0 && !sock_recoverable(sock_error())) { + printf("SOURCE: Client had unrecoverable error (%d) catching up (%ld/%ld)\n", sock_error(), sbytes, bytes); + refbuf_release(abuf); + client->con->error = 1; + } else { + client->pos +=...
2010 Jul 30
33
[PATCHES] Smartjog PatchDump
Hello, I work at SmarctJog.com, we have here some patches on IceCast for performance and reliability, these are mostly client/connection/source cleanups (a slave merge is underway, and some more good stuff (c)), but we'd like this to be merged in before the list gets any longer. Please find attached a list of our patches with a short desc: This one is actually not from us/me, it was found
2004 Aug 06
3
libnet: sock_connected insists on a timeout
While working on integrating nonblocking IO into libshout, I noticed that sock_connected cannot be called without blocking. If I read it right, a timeout of zero will cause the call to block until the socket is connected. So, my questions: 1. Am I reading this right? 2. How should I poll a pending connection? I'd prefer to have a zero timeout act as a poll, but I don't know if any other
2004 Aug 06
3
Icecast 2 for Live365 MP3 Relaying
Hi All, I attempted to switch my MP3 server from Icecast 1 to Icecast 2 today. I run a Live365 station, Big Planet Radio, which simply relays my local Icecast server. My Icecast 2 error.log file shows a lot of the following messages when the Live365 server, Nanocaster 2.5.6, is connected to it: [2003-05-14 22:09:15] DBUG format-mp3/format_mp3_write_buf_to_client Client had recoverable error
2004 Aug 06
3
Icecast 2 for Live365 MP3 Relaying
Hi All, I attempted to switch my MP3 server from Icecast 1 to Icecast 2 today. I run a Live365 station, Big Planet Radio, which simply relays my local Icecast server. My Icecast 2 error.log file shows a lot of the following messages when the Live365 server, Nanocaster 2.5.6, is connected to it: [2003-05-14 22:09:15] DBUG format-mp3/format_mp3_write_buf_to_client Client had recoverable error
2011 Apr 29
4
You don't check for malloc failure
...ecast-2.3.2/src/connection.c Thu Apr 28 19:53:43 2011 @@ -532,6 +532,9 @@ /* malloc enough room for a full IP address (including ipv6) */ ip = (char *)malloc(MAX_ADDR_LEN); + if (ip == NULL) { + abort(); + } sock = sock_accept(serversock, ip, MAX_ADDR_LEN); if (sock != SOCK_ERROR) diff -ru icecast-2.3.2-ORIG/src/format_vorbis.c icecast-2.3.2/src/format_vorbis.c --- icecast-2.3.2-ORIG/src/format_vorbis.c Thu Sep 13 00:40:55 2007 +++ icecast-2.3.2/src/format_vorbis.c Thu Apr 28 19:54:26 2011 @@ -401,6 +401,9 @@ plugin->set_tag = vorbis_set_tag; vorbis->bos_p...
2008 Dec 14
5
[PATCH] AF_VMCHANNEL address family for guest<->host communication.
...k(sk)->name, + VMCHANNEL_NAME_MAX); + + return 0; +} + +static int vmchannel_sock_sendmsg(struct kiocb *iocb, struct socket *sock, + struct msghdr *msg, size_t len) +{ + struct sock *sk = sock->sk; + struct vmchannel_sock *vmc = vmchannel_sk(sk); + struct sk_buff *skb; + int err; + + err = sock_error(sk); + if (err) + return err; + + if (msg->msg_flags & MSG_OOB) + return -EOPNOTSUPP; + + if (sk->sk_shutdown & SEND_SHUTDOWN) { + send_sig(SIGPIPE, current, 0); + return -EPIPE; + } + + if (sk->sk_state != TCP_ESTABLISHED) + return -ENOTCONN; + + skb = sock_alloc_send_skb(sk,...
2008 Dec 14
5
[PATCH] AF_VMCHANNEL address family for guest<->host communication.
...k(sk)->name, + VMCHANNEL_NAME_MAX); + + return 0; +} + +static int vmchannel_sock_sendmsg(struct kiocb *iocb, struct socket *sock, + struct msghdr *msg, size_t len) +{ + struct sock *sk = sock->sk; + struct vmchannel_sock *vmc = vmchannel_sk(sk); + struct sk_buff *skb; + int err; + + err = sock_error(sk); + if (err) + return err; + + if (msg->msg_flags & MSG_OOB) + return -EOPNOTSUPP; + + if (sk->sk_shutdown & SEND_SHUTDOWN) { + send_sig(SIGPIPE, current, 0); + return -EPIPE; + } + + if (sk->sk_state != TCP_ESTABLISHED) + return -ENOTCONN; + + skb = sock_alloc_send_skb(sk,...