diff options
Diffstat (limited to 'linden/indra/llplugin/llplugininstance.cpp')
-rwxr-xr-x | linden/indra/llplugin/llplugininstance.cpp | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/linden/indra/llplugin/llplugininstance.cpp b/linden/indra/llplugin/llplugininstance.cpp index b822b9e..67457f2 100755 --- a/linden/indra/llplugin/llplugininstance.cpp +++ b/linden/indra/llplugin/llplugininstance.cpp | |||
@@ -36,8 +36,7 @@ | |||
36 | #include "linden_common.h" | 36 | #include "linden_common.h" |
37 | 37 | ||
38 | #include "llplugininstance.h" | 38 | #include "llplugininstance.h" |
39 | 39 | #include "aiaprpool.h" | |
40 | #include "llapr.h" | ||
41 | 40 | ||
42 | /** Virtual destructor. */ | 41 | /** Virtual destructor. */ |
43 | LLPluginInstanceMessageListener::~LLPluginInstanceMessageListener() | 42 | LLPluginInstanceMessageListener::~LLPluginInstanceMessageListener() |
@@ -86,16 +85,16 @@ int LLPluginInstance::load(std::string &plugin_file) | |||
86 | 85 | ||
87 | int result = apr_dso_load(&mDSOHandle, | 86 | int result = apr_dso_load(&mDSOHandle, |
88 | plugin_file.c_str(), | 87 | plugin_file.c_str(), |
89 | gAPRPoolp); | 88 | AIAPRRootPool::get()()); |
90 | if(result != APR_SUCCESS) | 89 | if(result != APR_SUCCESS) |
91 | { | 90 | { |
92 | char buf[1024]; | 91 | char buf[1024]; |
93 | apr_dso_error(mDSOHandle, buf, sizeof(buf)); | 92 | apr_dso_error(mDSOHandle, buf, sizeof(buf)); |
94 | 93 | ||
95 | LL_WARNS("Plugin") << "apr_dso_load of " << plugin_file << " failed with error " << result << " , additional info string: " << buf << LL_ENDL; | 94 | LL_WARNS("PluginInstance") << "apr_dso_load of " << plugin_file << " failed with error " << result << " , additional info string: " << buf << LL_ENDL; |
96 | 95 | ||
97 | } | 96 | } |
98 | 97 | ||
99 | if(result == APR_SUCCESS) | 98 | if(result == APR_SUCCESS) |
100 | { | 99 | { |
101 | result = apr_dso_sym((apr_dso_handle_sym_t*)&init_function, | 100 | result = apr_dso_sym((apr_dso_handle_sym_t*)&init_function, |
@@ -104,20 +103,20 @@ int LLPluginInstance::load(std::string &plugin_file) | |||
104 | 103 | ||
105 | if(result != APR_SUCCESS) | 104 | if(result != APR_SUCCESS) |
106 | { | 105 | { |
107 | LL_WARNS("Plugin") << "apr_dso_sym failed with error " << result << LL_ENDL; | 106 | LL_WARNS("PluginInstance") << "apr_dso_sym failed with error " << result << LL_ENDL; |
108 | } | 107 | } |
109 | } | 108 | } |
110 | 109 | ||
111 | if(result == APR_SUCCESS) | 110 | if(result == APR_SUCCESS) |
112 | { | 111 | { |
113 | result = init_function(staticReceiveMessage, (void*)this, &mPluginSendMessageFunction, &mPluginUserData); | 112 | result = init_function(staticReceiveMessage, (void*)this, &mPluginSendMessageFunction, &mPluginUserData); |
114 | 113 | ||
115 | if(result != APR_SUCCESS) | 114 | if(result != APR_SUCCESS) |
116 | { | 115 | { |
117 | LL_WARNS("Plugin") << "call to init function failed with error " << result << LL_ENDL; | 116 | LL_WARNS("PluginInstance") << "call to init function failed with error " << result << LL_ENDL; |
118 | } | 117 | } |
119 | } | 118 | } |
120 | 119 | ||
121 | return (int)result; | 120 | return (int)result; |
122 | } | 121 | } |
123 | 122 | ||
@@ -130,12 +129,12 @@ void LLPluginInstance::sendMessage(const std::string &message) | |||
130 | { | 129 | { |
131 | if(mPluginSendMessageFunction) | 130 | if(mPluginSendMessageFunction) |
132 | { | 131 | { |
133 | LL_DEBUGS("Plugin") << "sending message to plugin: \"" << message << "\"" << LL_ENDL; | 132 | LL_DEBUGS("PluginInstance") << "sending message to plugin: \"" << message << "\"" << LL_ENDL; |
134 | mPluginSendMessageFunction(message.c_str(), &mPluginUserData); | 133 | mPluginSendMessageFunction(message.c_str(), &mPluginUserData); |
135 | } | 134 | } |
136 | else | 135 | else |
137 | { | 136 | { |
138 | LL_WARNS("Plugin") << "dropping message: \"" << message << "\"" << LL_ENDL; | 137 | LL_WARNS("PluginInstance") << "dropping message: \"" << message << "\"" << LL_ENDL; |
139 | } | 138 | } |
140 | } | 139 | } |
141 | 140 | ||
@@ -165,11 +164,11 @@ void LLPluginInstance::receiveMessage(const char *message_string) | |||
165 | { | 164 | { |
166 | if(mOwner) | 165 | if(mOwner) |
167 | { | 166 | { |
168 | LL_DEBUGS("Plugin") << "processing incoming message: \"" << message_string << "\"" << LL_ENDL; | 167 | LL_DEBUGS("PluginInstance") << "processing incoming message: \"" << message_string << "\"" << LL_ENDL; |
169 | mOwner->receivePluginMessage(message_string); | 168 | mOwner->receivePluginMessage(message_string); |
170 | } | 169 | } |
171 | else | 170 | else |
172 | { | 171 | { |
173 | LL_WARNS("Plugin") << "dropping incoming message: \"" << message_string << "\"" << LL_ENDL; | 172 | LL_WARNS("PluginInstance") << "dropping incoming message: \"" << message_string << "\"" << LL_ENDL; |
174 | } | 173 | } |
175 | } | 174 | } |