mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-25 22:55:56 -05:00
increased logging to debug wav streaming problem on win32/vista
This commit is contained in:
parent
aa7b98f214
commit
6df87878a5
5
src/io.c
5
src/io.c
@ -2306,8 +2306,6 @@ int io_socket_write(IO_PRIVHANDLE *phandle, unsigned char *buf,uint32_t *len) {
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
io_err_printf(IO_LOG_DEBUG,"writing to socket %d\n",priv->fd);
|
|
||||||
|
|
||||||
for(bufp = buf, bytestowrite = *len, totalbytes=0;
|
for(bufp = buf, bytestowrite = *len, totalbytes=0;
|
||||||
bytestowrite > 0;
|
bytestowrite > 0;
|
||||||
bufp += byteswritten, bytestowrite -= byteswritten) {
|
bufp += byteswritten, bytestowrite -= byteswritten) {
|
||||||
@ -2319,8 +2317,11 @@ int io_socket_write(IO_PRIVHANDLE *phandle, unsigned char *buf,uint32_t *len) {
|
|||||||
byteswritten = send(priv->fd, bufp, bytestowrite, 0);
|
byteswritten = send(priv->fd, bufp, bytestowrite, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
io_err_printf(IO_LOG_DEBUG,"wrote %d bytes to socket %d\n",byteswritten,priv->fd);
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
if(WSAGetLastError() == WSAEWOULDBLOCK) {
|
if(WSAGetLastError() == WSAEWOULDBLOCK) {
|
||||||
|
io_err_printf(IO_LOG_DEBUG,"WSAEWOULDBLOCK hack\n");
|
||||||
byteswritten = 0;
|
byteswritten = 0;
|
||||||
Sleep(50);
|
Sleep(50);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user