void IsapiServer::shutdown() { if (hasConfiguration()) log("notice") << "ISAPI: shutdown requested..."; { boost::mutex::scoped_lock l(queueMutex_); server_->stop(); } serverThread_.join(); if (hasConfiguration()) log("notice") << "ISAPI: shutdown completed..."; }
void IsapiServer::shutdown() { if (hasConfiguration()) log("notice") << "ISAPI: shutdown requested..."; { std::lock_guard<std::mutex> l(queueMutex_); server_->stop(); } if (serverThread_.joinable()) serverThread_.join(); if (hasConfiguration()) log("notice") << "ISAPI: shutdown completed..."; }
void IsapiServer::removeServer(WServer *server) { std::lock_guard<std::mutex> l(queueMutex_); if (server_ != server) { if (hasConfiguration()) { log("error") << "ISAPI internal error: removeServer() inconsistent"; } } server_ = 0; }
void IsapiServer::removeServer(WServer *server) { boost::mutex::scoped_lock l(queueMutex_); if (server_ != server) { if (hasConfiguration()) { log("error") << "ISAPI internal error: removeServer() inconsistent"; } } server_ = 0; }
void IsapiServer::serverEntry() { HMODULE module = GetCurrentModule(); char DllPath[_MAX_PATH]; char *pDllPath = DllPath; GetModuleFileName(module, DllPath, _MAX_PATH); FreeLibrary(module); try { main(1, &pDllPath); terminationMsg = mainReturnedReply; if (hasConfiguration()) log("fatal") << "ISAPI: main() returned"; } catch (std::exception &e) { terminationMsg = uncaughtExceptionReply; if (hasConfiguration()) log("fatal") << "ISAPI: uncaught main() exception: " << e.what(); } catch(...) { terminationMsg = uncaughtExceptionReply; if (hasConfiguration()) log("fatal") << "ISAPI: unknown uncaught main() exception"; } setTerminated(); }
void WorldConfig::buildAttributeMap(DatabaseResult* result) { Configuration_QueryContainer attribute; uint64 count = result->getRowCount(); BStringVector dataElements; DataBinding* mConfigurationBinding; mConfigurationBinding = mDatabase->createDataBinding(2); mConfigurationBinding->addField(DFT_bstring,offsetof(Configuration_QueryContainer,mKey),64,0); mConfigurationBinding->addField(DFT_bstring,offsetof(Configuration_QueryContainer,mValue),128,1); //gLogger->log(LogManager::DEBUG,"Adding Attribute Configuration"); for(uint64 i = 0; i < count; i++) { result->getNextRow(mConfigurationBinding,(void*)&attribute); //gLogger->logCont(LogManager::DEBUG,"Adding Attribute %s: %s ",attribute.mKey.getAnsi(),attribute.mValue.getAnsi()); if(hasConfiguration(attribute.mKey)) { setConfiguration(attribute.mKey,std::string(attribute.mValue.getAnsi())); } else { addConfiguration(attribute.mKey,std::string(attribute.mValue.getAnsi())); } } if (count) { LOG(INFO) << "Mapped attributes mapped: [" << count << "]"; } }