search for: sock_recoverable

Displaying 10 results from an estimated 10 matches for "sock_recoverable".

2004 Aug 06
0
Submission: Patch to libshout/sock.c for MacOSX
...cket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <sys/time.h> #include <netdb.h> #else #include <winsock.h> #endif #ifndef HAVE_SOCKLEN_T #define socklen_t int #endif #ifndef _WIN32 extern int h_errno, errno; #endif #include "sock.h" int sock_recoverable(int error) { if (error == EAGAIN || error == EINTR || error == EINPROGRESS || error == EWOULDBLOCK) { return 1; } return 0; } int sock_valid_socket(SOCKET sockfd) { return (sockfd >= 0); } #ifdef _WIN32 int inet_aton(const char *s, struct in_addr *a) { int lsb, b2, b3, msb; if (sscan...
2004 Aug 06
2
PATCH: increase network congestion resilience (SOLVED!)
...ny byte > > to check if the TCP buffers are full due to network congestion. > > Why? This should be no different from doing the send() (and 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...
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
improved error.log output --diff
...l.serversock[i]); - 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_...
2004 Aug 06
2
Second patch again CVS version
I send a patch again the last CVS version. The changes are: - Configurable prebuffer, in seconds. - prebuffering parameter in configurable in <limits>...<prebuffer>seconds</prebuffer>... - Created a new function (send_client_queue) to send the client->queue. Better modularisation. - Moved queue_lenght verification to send_client_queue(). - instead of disconnecting when
2004 Aug 06
4
Second patch again CVS version
...>> > - Solved a bug in source.c, when checking for recoverable error. It has > > to be done _only_ when result < 0. > > Can I see this patch separate too? No completely because I moved part of it to the new send_queue() function, but basically is: - if (!sock_recoverable(bytes)) { + if (sbytes < 0 && !sock_recoverable(bytes)) { <p><p><p>> > I was very careful checking connection and memory leaks, the maximum RSS > > reported by ps is 1288 KB (after running several days). > > Which I assume means you...
2009 Jul 06
1
Nonblocking connect is not proprly checked in poll implementation
...s char* */ + if (getsockopt(sock, SOL_SOCKET, SO_ERROR, (void*) &val, &size) == 0) + { + if (val == 0) + return 1; + sock_set_error (val); + } + /* fall through */ case -1: if (sock_recoverable (sock_error())) return 0; return SOCK_ERROR; - default: return 1; } } -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 190...
2004 Aug 06
2
ICECAST enseirb group
...-------------------------------------- > > > > 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 return of the > > "sanity check". > > > > ---------------------------------------- > > > > In fserv_thread_function , there is...
2004 Aug 06
2
Re: PATCH: increase network congestion resilience
...lient->con->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-...
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