Menu

#145 send(res_buf) error

open
nobody
None
5
2012-06-26
2012-06-26
Anonymous
No

I have compiled from CVS HEAD on OpenBSD 5.1 release.
I get send(2) error depending on what content I have in my media database. With just a few files I don't get any error.

I get the following type of error in the log:
[2012/06/26 11:00:59] upnphttp.c:1284: error: send(res_buf): 23360 bytes sent (out of 31739)

It seems that the case where not all bytes are sent over socket is unhandled (upnphttp.c) looking at TODO ...

void
SendResp_upnphttp(struct upnphttp * h)
{
int n;
DPRINTF(E_DEBUG, L_HTTP, "HTTP RESPONSE: %.*s\n", h->res_buflen, h->res_buf);
n = send(h->socket, h->res_buf, h->res_buflen, 0);
if(n<0)
{
DPRINTF(E_ERROR, L_HTTP, "send(res_buf): %s\n", strerror(errno));
}
else if(n < h->res_buflen)
{
/* TODO : handle correctly this case */
DPRINTF(E_ERROR, L_HTTP, "send(res_buf): %d bytes sent (out of %d)\n",
n, h->res_buflen);
}
}

When this error occur I don't get any data to the media renderer (Windows Media Player in this case):

from the log:
[2012/06/26 11:00:43] minidlna.c:977: warn: Starting MiniDLNA version 1.1.0-cvs.
[2012/06/26 11:00:43] minidlna.c:366: warn: Creating new database at /var/cache/minidlna/files.db
[2012/06/26 11:00:43] minidlna.c:1020: warn: HTTP listening on port 8200
[2012/06/26 11:00:43] minidlna.c:1032: warn: TiVo support is enabled.
[2012/06/26 11:00:43] scanner.c:708: warn: Scanning /var/media/audio
[2012/06/26 11:00:44] scanner.c:775: warn: Scanning /var/media/audio finished (69 files)!
[2012/06/26 11:00:44] playlist.c:125: warn: Parsing playlists...
[2012/06/26 11:00:44] playlist.c:256: warn: Finished parsing playlists.
[2012/06/26 11:00:46] upnpsoap.c:1746: warn: Returning UPnPError 402: Invalid Args
[2012/06/26 11:00:46] upnpsoap.c:1746: warn: Returning UPnPError 402: Invalid Args
[2012/06/26 11:00:46] upnpsoap.c:1746: warn: Returning UPnPError 402: Invalid Args
[2012/06/26 11:00:46] upnpsoap.c:1746: warn: Returning UPnPError 402: Invalid Args
[2012/06/26 11:00:59] sql.c:117: warn: sql_get_int_field: step failed: SQL logic error or missing database
SELECT count(*) from OBJECTS where PARENT_ID = '0'
[2012/06/26 11:00:59] upnphttp.c:1284: error: send(res_buf): 23360 bytes sent (out of 31739)
[2012/06/26 11:01:00] upnphttp.c:1284: error: send(res_buf): 23360 bytes sent (out of 31739)
[2012/06/26 11:01:20] upnpsoap.c:1746: warn: Returning UPnPError 402: Invalid Args
[2012/06/26 11:01:25] upnphttp.c:1284: error: send(res_buf): 23360 bytes sent (out of 47703)
[2012/06/26 11:01:26] upnphttp.c:1284: error: send(res_buf): 23360 bytes sent (out of 31739)
[2012/06/26 11:01:27] upnpsoap.c:1746: warn: Returning UPnPError 402: Invalid Args
[2012/06/26 11:01:29] upnphttp.c:1284: error: send(res_buf): 23360 bytes sent (out of 31739)
[2012/06/26 11:01:31] upnphttp.c:1284: error: send(res_buf): 23360 bytes sent (out of 31739)
[2012/06/26 11:01:32] upnphttp.c:1284: error: send(res_buf): 23360 bytes sent (out of 31739)

Discussion


Log in to post a comment.