From: Maxim Mamontov Date: Mon, 30 May 2011 11:34:42 +0000 (+0300) Subject: DB store plugin params unified X-Git-Tag: 2.408-alpha~116 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/6648a2d7bfaf981cb401403eb9b4b717abda6f9f DB store plugin params unified --- diff --git a/projects/stargazer/inst/freebsd/etc/stargazer/conf-available.d/store_mysql.conf b/projects/stargazer/inst/freebsd/etc/stargazer/conf-available.d/store_mysql.conf index 475b5f27..4cd2c0de 100644 --- a/projects/stargazer/inst/freebsd/etc/stargazer/conf-available.d/store_mysql.conf +++ b/projects/stargazer/inst/freebsd/etc/stargazer/conf-available.d/store_mysql.conf @@ -3,23 +3,23 @@ # Parameter: required # Value: IP address or DNS name # Default: localhost - dbhost = localhost + server = localhost # Database name # Parameter: required # Value: any, supported by database # Default: stg - dbname = stg + database = stg # Database username # Parameter: required # Value: any, supported by database # Default: stg - dbuser = stg + user = stg # Database password # Parameter: required # Value: any, supported by database # Default: 123456 - rootdbpass = 123456 - \ No newline at end of file + password = 123456 + diff --git a/projects/stargazer/inst/linux/etc/stargazer/conf-available.d/store_mysql.conf b/projects/stargazer/inst/linux/etc/stargazer/conf-available.d/store_mysql.conf index 475b5f27..4cd2c0de 100644 --- a/projects/stargazer/inst/linux/etc/stargazer/conf-available.d/store_mysql.conf +++ b/projects/stargazer/inst/linux/etc/stargazer/conf-available.d/store_mysql.conf @@ -3,23 +3,23 @@ # Parameter: required # Value: IP address or DNS name # Default: localhost - dbhost = localhost + server = localhost # Database name # Parameter: required # Value: any, supported by database # Default: stg - dbname = stg + database = stg # Database username # Parameter: required # Value: any, supported by database # Default: stg - dbuser = stg + user = stg # Database password # Parameter: required # Value: any, supported by database # Default: 123456 - rootdbpass = 123456 - \ No newline at end of file + password = 123456 + diff --git a/projects/stargazer/plugins/store/mysql/mysql_store.cpp b/projects/stargazer/plugins/store/mysql/mysql_store.cpp index ac5818d5..54e13f86 100644 --- a/projects/stargazer/plugins/store/mysql/mysql_store.cpp +++ b/projects/stargazer/plugins/store/mysql/mysql_store.cpp @@ -153,13 +153,17 @@ return 0; //----------------------------------------------------------------------------- int MYSQL_STORE_SETTINGS::ParseSettings(const MODULE_SETTINGS & s) { -if (ParseParam(s.moduleParams, "dbuser", dbUser) < 0) +if (ParseParam(s.moduleParams, "user", dbUser) < 0 && + ParseParam(s.moduleParams, "dbuser", dbUser) < 0) return -1; -if (ParseParam(s.moduleParams, "rootdbpass", dbPass) < 0) +if (ParseParam(s.moduleParams, "password", dbPass) < 0 && + ParseParam(s.moduleParams, "rootdbpass", dbPass) < 0) return -1; -if (ParseParam(s.moduleParams, "dbname", dbName) < 0) +if (ParseParam(s.moduleParams, "database", dbName) < 0 && + ParseParam(s.moduleParams, "dbname", dbName) < 0) return -1; -if (ParseParam(s.moduleParams, "dbhost", dbHost) < 0) +if (ParseParam(s.moduleParams, "server", dbHost) < 0 && + ParseParam(s.moduleParams, "dbhost", dbHost) < 0) return -1; return 0;