diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2004-09-25 14:10:06 +0000 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2004-09-25 14:10:06 +0000 |
commit | 1bf19b822d6248f32b7b9a02ef8cd9d404f058e6 (patch) | |
tree | fa1a430497ae15bba2ba5e55ca3d37b0361fc71e /ndb/src/kernel/main.cpp | |
parent | 8a9cb1af9ca7011aeb797b7701055bcff6406ce0 (diff) | |
download | mariadb-git-1bf19b822d6248f32b7b9a02ef8cd9d404f058e6.tar.gz |
moved LocalConfig out of config retriver
Diffstat (limited to 'ndb/src/kernel/main.cpp')
-rw-r--r-- | ndb/src/kernel/main.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/ndb/src/kernel/main.cpp b/ndb/src/kernel/main.cpp index 20844db75b6..035dfff8d01 100644 --- a/ndb/src/kernel/main.cpp +++ b/ndb/src/kernel/main.cpp @@ -19,6 +19,7 @@ #include <ndb_version.h> #include "Configuration.hpp" +#include <LocalConfig.hpp> #include <TransporterRegistry.hpp> #include "vm/SimBlockList.hpp" @@ -67,12 +68,19 @@ NDB_MAIN(ndb_kernel){ // Parse command line options Configuration* theConfig = globalEmulatorData.theConfiguration; if(!theConfig->init(argc, argv)){ - return 0; + return NRT_Default; } + LocalConfig local_config; + if (!local_config.init(theConfig->getConnectString(),0)){ + local_config.printError(); + local_config.printUsage(); + return NRT_Default; + } + { // Do configuration signal(SIGPIPE, SIG_IGN); - theConfig->fetch_configuration(); + theConfig->fetch_configuration(local_config); } chdir(NdbConfig_get_path(0)); @@ -135,7 +143,7 @@ NDB_MAIN(ndb_kernel){ exit(0); } g_eventLogger.info("Ndb has terminated (pid %d) restarting", child); - theConfig->fetch_configuration(); + theConfig->fetch_configuration(local_config); } g_eventLogger.info("Angel pid: %d ndb pid: %d", getppid(), getpid()); |