Merge branch 'develop' into schemarouter_refresh

This commit is contained in:
Markus Makela
2015-08-12 16:49:37 +03:00
2 changed files with 43 additions and 11 deletions

View File

@ -27,8 +27,8 @@ The full list of dependencies for the most common distributions is provided in t
You will need to install all of the following packages for all versions of RHEL and CentOS.
```
gcc gcc-c++ ncurses-devel bison glibc-devel cmake libgcc perl make libtool
openssl-devel libaio libaio-devel librabbitmq-devel libcurl-devel pcre-devel
gcc gcc-c++ ncurses-devel bison glibc-devel cmake libgcc perl make libtool \
openssl-devel libaio libaio-devel librabbitmq-devel libcurl-devel pcre-devel
```
In addition, if you wish to to build an RPM package include:
@ -61,7 +61,7 @@ MariaDB-devel MariaDB-server
These packages are required on all versions of Ubuntu and Debian.
```
build-essential libssl-dev libaio-dev ncurses-dev bison
build-essential libssl-dev libaio-dev ncurses-dev bison \
cmake perl libtool librabbitmq-dev libcurl-dev libpcre3-dev
```

View File

@ -1575,7 +1575,11 @@ int main(int argc, char **argv)
goto return_main;
}
ini_parse(cnf_file_path,cnf_preparser,NULL);
if(ini_parse(cnf_file_path,cnf_preparser,NULL) != 0)
{
rc = MAXSCALE_BADCONFIG;
goto return_main;
}
/** Use the cache dir for the mysql folder of the embedded library */
@ -2076,7 +2080,7 @@ bool handle_path_arg(char** dest, char* path, char* arg, bool rd, bool wr)
* @param section Section name
* @param name Parameter name
* @param value Parameter value
* @return 1 in all cases
* @return 0 on error, 1 when successful
*/
static int cnf_preparser(void* data, const char* section, const char* name, const char* value)
{
@ -2094,14 +2098,24 @@ static int cnf_preparser(void* data, const char* section, const char* name, cons
{
set_logdir(tmp);
}
else
{
return 0;
}
}
}
else if(strcmp(name, "libdir") == 0)
{
if(get_libdir() == default_libdir )
if(strcmp(get_libdir(),default_libdir) == 0 )
{
handle_path_arg(&tmp,(char*)value,NULL,true,false);
set_libdir(tmp);
if(handle_path_arg(&tmp,(char*)value,NULL,true,false))
{
set_libdir(tmp);
}
else
{
return 0;
}
}
}
else if(strcmp(name, "piddir") == 0)
@ -2112,6 +2126,10 @@ static int cnf_preparser(void* data, const char* section, const char* name, cons
{
set_piddir(tmp);
}
else
{
return 0;
}
}
}
else if(strcmp(name, "datadir") == 0)
@ -2124,14 +2142,24 @@ static int cnf_preparser(void* data, const char* section, const char* name, cons
set_datadir(tmp);
datadir_defined = true;
}
else
{
return 0;
}
}
}
else if(strcmp(name, "cachedir") == 0)
{
if(get_cachedir() == default_cachedir)
if(strcmp(get_cachedir(),default_cachedir) == 0)
{
handle_path_arg((char**)&tmp,(char*)value,NULL,true,false);
set_cachedir(tmp);
if(handle_path_arg((char**)&tmp,(char*)value,NULL,true,false))
{
set_cachedir(tmp);
}
else
{
return 0;
}
}
}
else if(strcmp(name, "language") == 0)
@ -2142,6 +2170,10 @@ static int cnf_preparser(void* data, const char* section, const char* name, cons
{
set_langdir(tmp);
}
else
{
return 0;
}
}
}
else if(strcmp(name, "syslog") == 0)