Commit 34e5cca1 authored by unknown's avatar unknown

Setup connect string

parent 80b27997
...@@ -377,6 +377,7 @@ setup_config(atrt_config& config){ ...@@ -377,6 +377,7 @@ setup_config(atrt_config& config){
int lineno = 0; int lineno = 0;
char buf[2048]; char buf[2048];
BaseString connect_string;
while(fgets(buf, 2048, f)){ while(fgets(buf, 2048, f)){
lineno++; lineno++;
...@@ -446,7 +447,6 @@ setup_config(atrt_config& config){ ...@@ -446,7 +447,6 @@ setup_config(atrt_config& config){
} }
} }
BaseString connect_string;
for(size_t i = 0; i<hosts.size(); i++){ for(size_t i = 0; i<hosts.size(); i++){
BaseString & tmp = hosts[i]; BaseString & tmp = hosts[i];
atrt_host * host = find(tmp, config.m_hosts); atrt_host * host = find(tmp, config.m_hosts);
...@@ -498,14 +498,14 @@ setup_config(atrt_config& config){ ...@@ -498,14 +498,14 @@ setup_config(atrt_config& config){
} }
config.m_processes.push_back(proc); config.m_processes.push_back(proc);
} }
}
// Setup connect string // Setup connect string
for(size_t i = 0; i<config.m_processes.size(); i++){ for(size_t i = 0; i<config.m_processes.size(); i++){
config.m_processes[i].m_proc.m_env.appfmt(" NDB_CONNECTSTRING=nodeid=%d%s", config.m_processes[i].m_proc.m_env.appfmt(" NDB_CONNECTSTRING=nodeid=%d%s",
i+1, connect_string.c_str()); i+1, connect_string.c_str());
}
} }
end: end:
fclose(f); fclose(f);
return result; return result;
......
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