From 2f484c23e34f0cfdcc2b1f4381b1ed082fb983ef Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Wed, 14 Apr 2004 07:04:05 +0000 Subject: [PATCH] minor fixes to art-merge --- src/configfile.c | 5 ++++- src/main.c | 10 ++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/configfile.c b/src/configfile.c index fc7535ff..b62050c8 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -227,9 +227,11 @@ int config_read(char *file) { err=0; while((pce->config_element != -1)) { if(pce->required && pce->config_element && !pce->changed) { - fprintf(stderr,"Required config entry '%s' not specified\n",pce->name); + DPRINTF(ERR_LOG,"Required config entry '%s' not specified\n",pce->name); err=-1; } + + /* too much spam on startup if((pce->config_element) && (pce->changed)) { switch(pce->type) { case CONFIG_TYPE_STRING: @@ -240,6 +242,7 @@ int config_read(char *file) { break; } } + */ pce->changed=0; pce++; diff --git a/src/main.c b/src/main.c index eb4796a7..6d708c7d 100644 --- a/src/main.c +++ b/src/main.c @@ -285,15 +285,13 @@ void daap_handler(WS_CONNINFO *pwsc) { if(!offset) config.stats.songs_served++; /* FIXME: remove stat races */ - if((config.artfilename) && (img_fd=da_get_image_fd(pmp3->path)) && (!offset)) { - DPRINTF(ERR_INFO,"Dynamically attaching artwork to %s\n",pmp3->fname); + if((config.artfilename) && (img_fd=da_get_image_fd(pmp3->path))) { + DPRINTF(ERR_INFO,"Dynamically attaching artwork to %s (fd %d)\n", + pmp3->fname, img_fd); da_attach_image(img_fd, pwsc->fd, file_fd, offset); - r_close(img_fd); - } else { - if(offset) { + } else if(offset) { DPRINTF(ERR_INFO,"Seeking to offset %d\n",offset); lseek(file_fd,offset,SEEK_SET); - } } if(copyfile(file_fd,pwsc->fd)) {