mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-03 01:46:02 -05:00
Tune down logging a bit more
This commit is contained in:
parent
208ef6b1f2
commit
a921916f30
@ -145,10 +145,9 @@ uint64_t scan_aac_findatom(IOHANDLE hfile, uint64_t max_offset,
|
|||||||
char atom[4];
|
char atom[4];
|
||||||
uint32_t bytes_read;
|
uint32_t bytes_read;
|
||||||
|
|
||||||
while(current_offset < max_offset) {
|
while((current_offset + 8) < max_offset) {
|
||||||
bytes_read = sizeof(uint32_t);
|
bytes_read = sizeof(uint32_t);
|
||||||
if(!io_read(hfile,(unsigned char *)&size,&bytes_read) || (!bytes_read)) {
|
if(!io_read(hfile,(unsigned char *)&size,&bytes_read) || (!bytes_read)) {
|
||||||
DPRINTF(E_LOG,L_SCAN,"Error parsing file: %s\n",io_errstr(hfile));
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,7 +161,6 @@ uint64_t scan_aac_findatom(IOHANDLE hfile, uint64_t max_offset,
|
|||||||
|
|
||||||
bytes_read = 4;
|
bytes_read = 4;
|
||||||
if(!io_read(hfile,(unsigned char *)atom,&bytes_read) || (!bytes_read)) {
|
if(!io_read(hfile,(unsigned char *)atom,&bytes_read) || (!bytes_read)) {
|
||||||
DPRINTF(E_LOG,L_SCAN,"Error parsing file: %s\n",io_errstr(hfile));
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1048,7 +1048,7 @@ int scan_get_wmainfo(char *filename, MP3FILE *pmp3) {
|
|||||||
|
|
||||||
pguid = wma_find_guid(subhdr.objectid);
|
pguid = wma_find_guid(subhdr.objectid);
|
||||||
if(pguid) {
|
if(pguid) {
|
||||||
DPRINTF(E_DBG,L_SCAN,"0x%08X: Found subheader: %s\n",
|
DPRINTF(E_DBG,L_SCAN,"%ll: Found subheader: %s\n",
|
||||||
offset,pguid->name);
|
offset,pguid->name);
|
||||||
if(strcmp(pguid->name,"ASF_Content_Description_Object")==0) {
|
if(strcmp(pguid->name,"ASF_Content_Description_Object")==0) {
|
||||||
res &= wma_parse_content_description(hfile,(int)subhdr.size,pmp3);
|
res &= wma_parse_content_description(hfile,(int)subhdr.size,pmp3);
|
||||||
|
@ -1198,7 +1198,7 @@ int ws_writefd(WS_CONNINFO *pwsc, char *fmt, ...) {
|
|||||||
|
|
||||||
len = (uint32_t)strlen(buffer);
|
len = (uint32_t)strlen(buffer);
|
||||||
if(!io_write(pwsc->hclient,(unsigned char *)buffer,&len)) {
|
if(!io_write(pwsc->hclient,(unsigned char *)buffer,&len)) {
|
||||||
ws_dprintf(L_WS_LOG,"Error writing to client socket: %s\n",
|
ws_dprintf(L_WS_DBG,"Error writing to client socket: %s\n",
|
||||||
io_errstr(pwsc->hclient));
|
io_errstr(pwsc->hclient));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1244,6 +1244,7 @@ int ws_returnerror(WS_CONNINFO *pwsc,int error, char *description) {
|
|||||||
char *useragent;
|
char *useragent;
|
||||||
int err_code;
|
int err_code;
|
||||||
char *err_str;
|
char *err_str;
|
||||||
|
int keep_alive = 0;
|
||||||
|
|
||||||
WS_ENTER();
|
WS_ENTER();
|
||||||
|
|
||||||
@ -1253,10 +1254,19 @@ int ws_returnerror(WS_CONNINFO *pwsc,int error, char *description) {
|
|||||||
|
|
||||||
/* we'll force a close here unless the user agent is
|
/* we'll force a close here unless the user agent is
|
||||||
iTunes, which seems to get pissy about it */
|
iTunes, which seems to get pissy about it */
|
||||||
|
|
||||||
useragent = ws_getarg(&pwsc->request_headers,"User-Agent");
|
useragent = ws_getarg(&pwsc->request_headers,"User-Agent");
|
||||||
if((useragent) &&
|
if((useragent) &&
|
||||||
(((strncmp(useragent,"iTunes",6) == 0) && (error == 401)) ||
|
(((strncmp(useragent,"iTunes",6) == 0) && (error == 401)) ||
|
||||||
((strncmp(useragent,"Java",4) == 0)))) {
|
((strncmp(useragent,"Java",4) == 0)))) {
|
||||||
|
keep_alive = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(error == 302) {
|
||||||
|
keep_alive = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(keep_alive) {
|
||||||
ws_addarg(&pwsc->response_headers,"Connection","keep-alive");
|
ws_addarg(&pwsc->response_headers,"Connection","keep-alive");
|
||||||
ws_addarg(&pwsc->response_headers,"Content-Length","2");
|
ws_addarg(&pwsc->response_headers,"Content-Length","2");
|
||||||
ws_emitheaders(pwsc);
|
ws_emitheaders(pwsc);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user