diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-11-02 02:44:11 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-11-02 02:44:11 +0000 |
commit | aab6515c52aebd5532ba6d5326196395928d39ba (patch) | |
tree | e1a6f6a49d3d43404906e792ca9fabf81557db3f /src/conf.c | |
parent | 9ef68105cb3fde47c15224054e1c6755c333018f (diff) | |
download | mpd-aab6515c52aebd5532ba6d5326196395928d39ba.tar.gz mpd-aab6515c52aebd5532ba6d5326196395928d39ba.tar.xz mpd-aab6515c52aebd5532ba6d5326196395928d39ba.zip |
patches for 0.11.5 bug fix from the following revision changes:
1993
2000
2001
2026
2028
2038
2078
2116
2163
2164
2230
2236
2270
2337
2339
2420
2426
git-svn-id: https://svn.musicpd.org/mpd/branches/branch-0.11.4-fixes@2461 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/conf.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/conf.c b/src/conf.c index 1eadc36fe..3b6aa8242 100644 --- a/src/conf.c +++ b/src/conf.c @@ -37,7 +37,7 @@ #define CONF_COMMENT '#' -#define CONF_NUMBER_OF_PARAMS 34 +#define CONF_NUMBER_OF_PARAMS 35 #define CONF_NUMBER_OF_PATHS 6 #define CONF_NUMBER_OF_REQUIRED 5 #define CONF_NUMBER_OF_ALLOW_CATS 1 @@ -130,7 +130,8 @@ char ** readConf(char * file) { "http_proxy_port", "http_proxy_user", "http_proxy_password", - "replaygain_preamp" + "replaygain_preamp", + "id3v1_encoding" }; int conf_absolutePaths[CONF_NUMBER_OF_PATHS] = { @@ -160,6 +161,7 @@ char ** readConf(char * file) { int i; int numberOfArgs; short allowCat[CONF_NUMBER_OF_PARAMS]; + int count = 0; for(i=0;i<CONF_NUMBER_OF_PARAMS;i++) allowCat[i] = 0; @@ -171,19 +173,22 @@ char ** readConf(char * file) { } while(myFgets(string,sizeof(string),fp)) { + count++; + if(string[0]==CONF_COMMENT) continue; numberOfArgs = buffer2array(string,&array); if(numberOfArgs==0) continue; if(2!=numberOfArgs) { - ERROR("improperly formated config line: %s\n",string); + ERROR("improperly formated config file at line %i: %s\n",count,string); exit(EXIT_FAILURE); } i = 0; while(i<CONF_NUMBER_OF_PARAMS && 0!=strcmp(conf_strings[i],array[0])) i++; if(i>=CONF_NUMBER_OF_PARAMS) { - ERROR("unrecognized line in conf: %s\n",string); + ERROR("unrecognized paramater in conf at line %i: %s\n",count,string); exit(EXIT_FAILURE); } + if(conf_params[i]!=NULL) { if(allowCat[i]) { conf_params[i] = realloc(conf_params[i], |