From b72424fca7a6af6ff7921101c450850fef875152 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sun, 6 Mar 2016 13:52:48 +0300 Subject: Support multiple instances of brep in a single Apache instance --- brep/module.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'brep/module.cxx') diff --git a/brep/module.cxx b/brep/module.cxx index e8a824d..1257d82 100644 --- a/brep/module.cxx +++ b/brep/module.cxx @@ -30,7 +30,7 @@ namespace brep try { - if (!loaded_) + if (!initialized_) { MODULE_DIAG; fail << "not initialized, presumably due to misconfiguration"; @@ -187,7 +187,7 @@ namespace brep void module:: init (const name_values& options, log& log) { - assert (!loaded_); + assert (!initialized_); log_ = &log; @@ -207,7 +207,7 @@ namespace brep options::module o (s, cli::unknown_mode::fail, cli::unknown_mode::fail); verb_ = o.verbosity (); - loaded_ = true; + initialized_ = true; } catch (const server_error& e) { @@ -236,7 +236,11 @@ namespace brep // Custom copy constructor is required to initialize log_writer_ properly. // module:: - module (const module& m): module () {verb_ = m.verb_; loaded_ = m.loaded_;} + module (const module& m): module () + { + verb_ = m.verb_; + initialized_ = m.initialized_; + } // For function func declared like this: // using B = std::string (*)(int); -- cgit v1.1