minor fixes to art-merge

This commit is contained in:
Ron Pedde 2004-04-14 07:04:05 +00:00
parent 3e31ccf1d2
commit 2f484c23e3
2 changed files with 8 additions and 7 deletions

View File

@ -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++;

View File

@ -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)) {