Commit 1bd774e9 authored by tomas@poseidon.(none)'s avatar tomas@poseidon.(none)

more aliases in ndb config

parent c81df5a0
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
const ConfigInfo::AliasPair const ConfigInfo::AliasPair
ConfigInfo::m_sectionNameAliases[]={ ConfigInfo::m_sectionNameAliases[]={
{"API", "MYSQLD"}, {"API", "MYSQLD"},
{"DB", "NDBD"},
{"MGM", "NDB_MGMD"},
{0, 0} {0, 0}
}; };
......
...@@ -222,7 +222,7 @@ bool InitConfigFileParser::parseNameValuePair(Context& ctx, const char* line) { ...@@ -222,7 +222,7 @@ bool InitConfigFileParser::parseNameValuePair(Context& ctx, const char* line) {
char tmpLine[MAX_LINE_LENGTH]; char tmpLine[MAX_LINE_LENGTH];
char fname[MAX_LINE_LENGTH], rest[MAX_LINE_LENGTH]; char fname[MAX_LINE_LENGTH], rest[MAX_LINE_LENGTH];
char* t; char* t;
const char *separator_list[]= {":", "="}; const char *separator_list[]= {":", "=", 0};
const char *separator= 0; const char *separator= 0;
if (ctx.m_currentSection == NULL){ if (ctx.m_currentSection == NULL){
...@@ -235,7 +235,7 @@ bool InitConfigFileParser::parseNameValuePair(Context& ctx, const char* line) { ...@@ -235,7 +235,7 @@ bool InitConfigFileParser::parseNameValuePair(Context& ctx, const char* line) {
// ************************************* // *************************************
// Check if a separator exists in line // Check if a separator exists in line
// ************************************* // *************************************
for(int i= 0; i < sizeof(separator_list); i++) { for(int i= 0; separator_list[i] != 0; i++) {
if(strchr(tmpLine, separator_list[i][0])) { if(strchr(tmpLine, separator_list[i][0])) {
separator= separator_list[i]; separator= separator_list[i];
break; break;
...@@ -522,7 +522,7 @@ InitConfigFileParser::parseDefaultSectionHeader(const char* line) const { ...@@ -522,7 +522,7 @@ InitConfigFileParser::parseDefaultSectionHeader(const char* line) const {
if (no != 2) return NULL; if (no != 2) return NULL;
// Not correct keyword at end // Not correct keyword at end
if (!strcmp(token2, "DEFAULT") == 0) return NULL; if (!strcasecmp(token2, "DEFAULT") == 0) return NULL;
if(m_info->getInfo(token1)){ if(m_info->getInfo(token1)){
return strdup(token1); return strdup(token1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment