diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-10-30 05:36:41 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-10-30 05:36:41 +0300 |
commit | 70d22ef07b945b799f6a8d39cbfbb1b6624f61a9 (patch) | |
tree | a731100dea038d3e1bd4bdd241fc0aca652911fa /core/modules.cpp | |
parent | 735fefae8bdfa3845493d15e87a7c31a454f8662 (diff) |
utf8
Diffstat (limited to 'core/modules.cpp')
-rw-r--r-- | core/modules.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/core/modules.cpp b/core/modules.cpp index 0246b40..3708655 100644 --- a/core/modules.cpp +++ b/core/modules.cpp @@ -60,10 +60,22 @@ void run_plugins() { boost::thread *thr; thr = new boost::thread(boost::bind((*i)->get_exported_functions()->Load, &pluglink)); - thr->timed_join(boost::posix_time::seconds(10)); + if(!thr->timed_join(boost::posix_time::seconds(10))) + { + std::string msg = "Thread execution timeout, plugin "; + msg += toUTF8((*i)->get_plugininfo()->name); + msg += " basic initialisation failed.\n"; + logger.log(LM_DEBUG, msg.c_str()); + } delete thr; thr = new boost::thread(boost::bind((*i)->get_exported_functions()->OnModulesLoaded)); - thr->timed_join(boost::posix_time::seconds(15)); + if(!thr->timed_join(boost::posix_time::seconds(15))) + { + std::string msg = "Thread execution timeout, plugin "; + msg += toUTF8((*i)->get_plugininfo()->name); + msg += " main initialisation failed.\n"; + logger.log(LM_DEBUG, msg.c_str()); + } delete thr; } } @@ -93,6 +105,11 @@ plugin::~plugin() delete exported_funcs; } +const PLUGININFO* plugin::get_plugininfo() +{ + return plugininfo; +} + const plugin::exported_functions_s* plugin::get_exported_functions() { return exported_funcs; |