> I tried upgrading my icecast server, but that failed miserably on my
> old mandrake box that I use as my Obsequiuem server. I would suspect
> this to be an icecast problem -- can you upgrade your icecast server
> to the latest and greatest?

Already did; no help.

I found the icecast bug, though - it is in sock.c.  There is a loop
that writes to the socket, and if there is a partial write it retries.
If there is a partial write, followed by "resource temporarily
unavailable", then it tries to re-send the bit that was already
partially sent... bad news.

I'll whip up a quick diff here.  This should solve the problem.  What
are the best diff options to use, anyway?


root@home:/tmp>diff -c sock.c sock_fixed.c 
*** sock.c      Sun Nov 12 20:19:43 2000
--- sock_fixed.c        Sun Nov 12 20:20:16 2000
***************
*** 528,534 ****
  
        for(t=0 ; len > 0 ; ) {
                int n=send(sockfd, buff+t, len, 0);
! 
                if(n < 0)
                    return n;
                t+=n;
--- 528,538 ----
  
        for(t=0 ; len > 0 ; ) {
                int n=send(sockfd, buff+t, len, 0);
!               if (-1 == n) {    /* "resource temporarily unavailable" */
!                       /* socket buffer probably full; pause and retry */
!                       usleep(250000); /* 1/4 second */
!                       n = 0;
!               }
                if(n < 0)
                    return n;
                t+=n;


_______________________________________________
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev

Reply via email to