Skip to content
Snippets Groups Projects
Commit b5342e23 authored by James Cook's avatar James Cook
Browse files

svn merge -r58163:58241 loadstone-sim-standby, reduces database load from...

svn merge -r58163:58241 loadstone-sim-standby, reduces database load from standby sims polling the database for a region to run
parent 647d29b1
No related branches found
No related tags found
No related merge requests found
......@@ -277,7 +277,7 @@ namespace
}
LLError::configure(configuration);
llwarns << "error logging reconfigured from " << filename() << llendl;
llinfos << "logging reconfigured from " << filename() << llendl;
}
......
/**
* @file llliveappconfig.cpp
* @brief Configuration information for an LLApp that overrides indra.xml
*
* Copyright (c) 2003-$CurrentYear$, Linden Research, Inc.
* $License$
*/
#include "linden_common.h"
#include "llliveappconfig.h"
#include "llapp.h"
#include "llsd.h"
#include "llsdserialize.h"
LLLiveAppConfig::LLLiveAppConfig(LLApp* app, const std::string& filename, F32 refresh_period)
: LLLiveFile(filename, refresh_period),
mApp(app)
{ }
LLLiveAppConfig::~LLLiveAppConfig()
{ }
// virtual
void LLLiveAppConfig::loadFile()
{
llinfos << "LLLiveAppConfig::loadFile(): reading from "
<< filename() << llendl;
llifstream file(filename().c_str());
LLSD config;
if (file.is_open())
{
LLSDSerialize::fromXML(config, file);
if(!config.isMap())
{
llinfos << "LLDataserverConfig::loadFile(): not an map!"
<< " Ignoring the data." << llendl;
return;
}
file.close();
}
mApp->setOptionData(
LLApp::PRIORITY_SPECIFIC_CONFIGURATION, config);
}
/**
* @file llliveappconfig.h
* @brief Configuration information for an LLApp that overrides indra.xml
*
* Copyright (c) 2003-$CurrentYear$, Linden Research, Inc.
* $License$
*/
#ifndef LLLIVEAPPCONFIG_H
#define LLLIVEAPPCONFIG_H
#include "lllivefile.h"
class LLApp;
class LLLiveAppConfig : public LLLiveFile
{
public:
// To use this, instantiate a LLLiveAppConfig object inside your main loop.
// The traditional name for it is live_config.
// Be sure to call live_config.checkAndReload() periodically.
LLLiveAppConfig(LLApp* app, const std::string& filename, F32 refresh_period);
~LLLiveAppConfig();
protected:
/*virtual*/ void loadFile();
private:
LLApp* mApp;
};
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment