Joe Holt's patches for config trashage

This commit is contained in:
Ron Pedde 2005-06-15 02:44:32 +00:00
parent 5c3e37e564
commit f321aca92f
2 changed files with 7 additions and 5 deletions

View File

@ -83,5 +83,8 @@ North Overby
* Patches for disc number * Patches for disc number
* alac speedups for nslu2 * alac speedups for nslu2
Joe Holt
* Fixes for web config stupidness

View File

@ -468,7 +468,6 @@ void config_close(void) {
CONFIGELEMENT *pce; CONFIGELEMENT *pce;
int err; int err;
/* check to see if all required elements are satisfied */
free(config.configfile); free(config.configfile);
pce=config_elements; pce=config_elements;
err=0; err=0;
@ -677,12 +676,12 @@ void config_handler(WS_CONNINFO *pwsc) {
/* ignore stopmdns and startmdns */ /* ignore stopmdns and startmdns */
if (strcasecmp(pw,"stopdaap")==0) { if (strcasecmp(pw,"stopdaap")==0) {
config.stop=1; config.stop=1;
} } else if (strcasecmp(pw,"rescan")==0) {
if (strcasecmp(pw,"rescan")==0) {
config.reload=1; config.reload=1;
} }
} else { } else if (ws_getvar(pwsc,"web_root") != NULL) {
/* we need to update stuff */ /* Make sure we got here from a post, and then
* we need to update stuff */
pw=ws_getvar(pwsc,"admin_pw"); pw=ws_getvar(pwsc,"admin_pw");
if(pw) { if(pw) {
if(config.adminpassword) if(config.adminpassword)