From 70d22ef07b945b799f6a8d39cbfbb1b6624f61a9 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Sat, 30 Oct 2010 05:36:41 +0300 Subject: utf8 --- core/modules.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'core/modules.cpp') 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; -- cgit v1.2.3