From 3c67ad1d03e3edb68cd3482b5b6a489c175eea6a Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Tue, 27 Apr 2010 22:20:25 +0000 Subject: Load client side plugins just before creating the first Connection. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@938701 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/LoadPlugins.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'cpp/src/qpid/client/LoadPlugins.cpp') diff --git a/cpp/src/qpid/client/LoadPlugins.cpp b/cpp/src/qpid/client/LoadPlugins.cpp index 82cdedc7fe..246eb60c67 100644 --- a/cpp/src/qpid/client/LoadPlugins.cpp +++ b/cpp/src/qpid/client/LoadPlugins.cpp @@ -19,6 +19,8 @@ * */ +#include "LoadPlugins.h" + #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -26,9 +28,13 @@ #include "qpid/sys/Shlib.h" #include #include + using std::vector; using std::string; +namespace qpid { +namespace client { + namespace { struct LoadtimeInitialise { @@ -47,6 +53,12 @@ struct LoadtimeInitialise { qpid::loadModuleDir (moduleOptions.loadDir, isDefault); } } -} init; +}; } // namespace + +void theModuleLoader() { + static LoadtimeInitialise l; +} + +}} // namespace qpid::client -- cgit v1.2.1