More linux fixes

This commit is contained in:
Ron Pedde 2003-12-01 20:06:09 +00:00
parent 2c029ddd15
commit 1b5e2ca2c4
2 changed files with 5 additions and 3 deletions

View File

@ -77,7 +77,7 @@ void daap_handler(WS_CONNINFO *pwsc) {
int file_fd; int file_fd;
int session_id=0; int session_id=0;
off_t offset; off_t offset=0;
off_t file_len; off_t file_len;
close=pwsc->close; close=pwsc->close;
@ -85,7 +85,7 @@ void daap_handler(WS_CONNINFO *pwsc) {
root=NULL; root=NULL;
ws_addresponseheader(pwsc,"Accept-Ranges","bytes"); ws_addresponseheader(pwsc,"Accept-Ranges","bytes");
ws_addresponseheader(pwsc,"DAAP-Server","iTunes/4.1 (Mac OS X)"); ws_addresponseheader(pwsc,"DAAP-Server","mt-daapd/%s",VERSION);
ws_addresponseheader(pwsc,"Content-Type","application/x-dmap-tagged"); ws_addresponseheader(pwsc,"Content-Type","application/x-dmap-tagged");
if(ws_getvar(pwsc,"session-id")) { if(ws_getvar(pwsc,"session-id")) {
@ -239,6 +239,8 @@ void daap_handler(WS_CONNINFO *pwsc) {
ws_emitheaders(pwsc); ws_emitheaders(pwsc);
config_set_status(pwsc,session_id,"Streaming file '%s'",pmp3->fname); config_set_status(pwsc,session_id,"Streaming file '%s'",pmp3->fname);
DPRINTF(ERR_INFO,"Streaming %s\n",pmp3->fname);
if(offset) { if(offset) {
lseek(file_fd,offset,SEEK_SET); lseek(file_fd,offset,SEEK_SET);
} }

View File

@ -375,7 +375,7 @@ int scan_gettags(char *file, MP3FILE *pmp3) {
used=1; used=1;
pmp3->genre = utf8_text; pmp3->genre = utf8_text;
DPRINTF(ERR_DEBUG," Genre: %s\n",utf8_text); DPRINTF(ERR_DEBUG," Genre: %s\n",utf8_text);
if(isdigit(pmp3->genre[0])) { if((pmp3->genre) && (isdigit(pmp3->genre[0]))) {
genre=atoi(pmp3->genre); genre=atoi(pmp3->genre);
free(pmp3->genre); free(pmp3->genre);
pmp3->genre=strdup(scan_winamp_genre[genre]); pmp3->genre=strdup(scan_winamp_genre[genre]);