From 8fedf2d81871a561d3fab1b790a3acba190cf18e Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Wed, 27 Oct 2004 04:09:05 +0000 Subject: [PATCH] web config would write blank passwords --- src/configfile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/configfile.c b/src/configfile.c index 6700947f..06e5d267 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -311,7 +311,8 @@ int config_write(WS_CONNINFO *pwsc) { fprintf(configfile,"servername\t%s\n",ws_getvar(pwsc,"servername")); fprintf(configfile,"runas\t\t%s\n",ws_getvar(pwsc,"runas")); fprintf(configfile,"playlist\t%s\n",ws_getvar(pwsc,"playlist")); - fprintf(configfile,"password\t%s\n",ws_getvar(pwsc,"password")); + if(ws_getvar(pwsc,"password") && strlen(ws_getvar(pwsc,"password"))) + fprintf(configfile,"password\t%s\n",ws_getvar(pwsc,"password")); fprintf(configfile,"extensions\t%s\n",ws_getvar(pwsc,"extensions")); fprintf(configfile,"db_dir\t\t%s\n",ws_getvar(pwsc,"db_dir")); fprintf(configfile,"rescan_interval\t%s\n",ws_getvar(pwsc,"rescan_interval"));