Configuration::load() reports missing files.
Fixed crash on reload in GtkClient outside X. git-svn-id: http://voip.null.ro/svn/yate@29 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
520edab187
commit
40b1b333d8
|
@ -568,10 +568,11 @@ public:
|
||||||
virtual void initialize();
|
virtual void initialize();
|
||||||
private:
|
private:
|
||||||
MessageHandler *m_route;
|
MessageHandler *m_route;
|
||||||
|
bool m_init;
|
||||||
};
|
};
|
||||||
|
|
||||||
GtkClientPlugin::GtkClientPlugin()
|
GtkClientPlugin::GtkClientPlugin()
|
||||||
: m_route(0)
|
: m_route(0), m_init(false)
|
||||||
{
|
{
|
||||||
Output("Loaded module GtkClient");
|
Output("Loaded module GtkClient");
|
||||||
}
|
}
|
||||||
|
@ -585,8 +586,10 @@ GtkClientPlugin::~GtkClientPlugin()
|
||||||
void GtkClientPlugin::initialize()
|
void GtkClientPlugin::initialize()
|
||||||
{
|
{
|
||||||
Output("Initializing module GtkClient");
|
Output("Initializing module GtkClient");
|
||||||
if (m_route)
|
if (m_init)
|
||||||
return;
|
return;
|
||||||
|
// gtk can only be initialized once so take care of it
|
||||||
|
m_init = true;
|
||||||
s_cfg = Engine::configFile("gtkclient");
|
s_cfg = Engine::configFile("gtkclient");
|
||||||
s_cfg.load();
|
s_cfg.load();
|
||||||
int priority = s_cfg.getIntValue("priorities","route",20);
|
int priority = s_cfg.getIntValue("priorities","route",20);
|
||||||
|
|
|
@ -171,6 +171,7 @@ bool Configuration::load()
|
||||||
::fclose(f);
|
::fclose(f);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Debug(DebugInfo,"Failed to open config file '%s'",c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue