diff --git a/CREDITS b/CREDITS index 32a4c585..b2baf60f 100644 --- a/CREDITS +++ b/CREDITS @@ -83,5 +83,8 @@ North Overby * Patches for disc number * alac speedups for nslu2 +Joe Holt + * Fixes for web config stupidness + diff --git a/src/configfile.c b/src/configfile.c index 820e904c..b032217e 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -468,7 +468,6 @@ void config_close(void) { CONFIGELEMENT *pce; int err; - /* check to see if all required elements are satisfied */ free(config.configfile); pce=config_elements; err=0; @@ -677,12 +676,12 @@ void config_handler(WS_CONNINFO *pwsc) { /* ignore stopmdns and startmdns */ if (strcasecmp(pw,"stopdaap")==0) { config.stop=1; - } - if (strcasecmp(pw,"rescan")==0) { + } else if (strcasecmp(pw,"rescan")==0) { config.reload=1; } - } else { - /* we need to update stuff */ + } else if (ws_getvar(pwsc,"web_root") != NULL) { + /* Make sure we got here from a post, and then + * we need to update stuff */ pw=ws_getvar(pwsc,"admin_pw"); if(pw) { if(config.adminpassword)