The windows build has been randomly skipping tracks.

When this happens I'm getting a WSAEWOULDBLOCK for last_error in
stream.c

Code:
--------------------
    [14:07:30.192] sendSTAT:156 STAT: STMf
  [14:07:30.192] codec_open:207 codec open: 'f'
  [14:07:30.192] stream_sock:358 connecting to 10.16.0.246:9000
  [14:07:30.207] stream_sock:387 header: GET 
/stream.mp3?player=00:30:70:00:00:01
  HTTP/1.0
  
  
  [14:07:30.207] sendSTAT:156 STAT: STMc
  [14:07:30.207] process_strm:322 set fade mode: 0
  [14:07:30.207] process:430 audg
  [14:07:30.207] process_audg:377 audg gainL: 4096 gainR: 4096 adjust: 1
  [14:07:30.285] stream_thread:152 headers: len: 113
  HTTP/1.1 200 OK
  Server: Logitech Media Server (7.8.0 - TRUNK)
  Connection: close
  Content-Type: audio/x-flac
  
  
  [14:07:30.285] sendRESP:187 RESP
  [14:07:30.301] stream_thread:229 error reading: Unknown error (10035)
  [14:07:30.301] sendDSCO:175 DSCO: 2
  [14:07:30.301] sendSTAT:156 STAT: STMt
  [14:07:30.379] write_cb:106 setting track_start
  [14:07:31.973] sendSTAT:156 STAT: STMt
  [14:07:31.973] process:430 strm
  [14:07:31.973] process_strm:224 strm command t
  [14:07:31.973] sendSTAT:156 STAT: STMt
  [14:07:33.801] decode_thread:99 decode complete
  [14:07:33.801] sendSTAT:156 STAT: STMd
  [14:07:36.973] process:430 strm
  [14:07:36.973] process_strm:224 strm command t
  [14:07:36.973] sendSTAT:156 STAT: STMt
  [14:07:37.020] process:430 strm
  [14:07:37.035] process_strm:224 strm command q
  [14:07:37.035] decode_flush:184 decode flush
  [14:07:37.035] output_flush:1539 flush output buffer
  [14:07:37.035] sendSTAT:156 STAT: STMf
  [14:07:41.973] process:430 strm
  [14:07:41.973] process_strm:224 strm command t
  [14:07:41.973] sendSTAT:156 STAT: STMt
  
--------------------


This patch fixes the problem for me.

Code:
--------------------
    
  diff --git a/stream.c b/stream.c
  index 0805e59..1d15a3a 100644
  --- a/stream.c
  +++ b/stream.c
  @@ -223,8 +223,12 @@ static void *stream_thread() {
  LOG_INFO("end of stream");
  _disconnect(DISCONNECT, DISCONNECT_OK);
  }
  -                                       if (n < 0 && last_error() != EAGAIN) {
  -                                               LOG_INFO("error reading: %s", 
strerror(last_error()));
  +                                       if (n < 0 && last_error() != EAGAIN
  +#if WIN
  +                                               && last_error() != 
WSAEWOULDBLOCK
  +#endif
  +                                               ) {
  +                                               LOG_INFO("error reading: %s 
(%d)", strerror(last_error()),last_error());
  _disconnect(DISCONNECT, REMOTE_DISCONNECT);
  }
  
--------------------



Ralphy

*1*-Touch, *4*-Classics, *2*-Booms, *2*-Squeezeslaves, *3*-Squeezeplays,
*3*-Squeezelites
'Squeezeslave' (http://code.google.com/p/squeezeslave/) 'donations'
(https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=LL5P6365KQEXN&lc=CA&item_name=Squeezeslave&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted)
always appreciated.
------------------------------------------------------------------------
ralphy's Profile: http://forums.slimdevices.com/member.php?userid=3484
View this thread: http://forums.slimdevices.com/showthread.php?t=97046

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to