diff options
author | McCabe Maxsted | 2011-02-10 11:33:32 -0700 |
---|---|---|
committer | McCabe Maxsted | 2011-02-10 11:33:32 -0700 |
commit | 77d16777c448cc4e09e0ddb1408260044f925c0b (patch) | |
tree | 74d6ab3e3a07b673698b760916c9212d69deaff6 /linden/indra/llplugin/llpluginprocessparent.cpp | |
parent | Use gstreamer plugin for windows audio mime types (diff) | |
download | meta-impy-77d16777c448cc4e09e0ddb1408260044f925c0b.zip meta-impy-77d16777c448cc4e09e0ddb1408260044f925c0b.tar.gz meta-impy-77d16777c448cc4e09e0ddb1408260044f925c0b.tar.bz2 meta-impy-77d16777c448cc4e09e0ddb1408260044f925c0b.tar.xz |
Patch by Armin to split apart the 'Plugin' logcontrol.xml entry to avoid spam when debugging plugins
Diffstat (limited to '')
-rwxr-xr-x | linden/indra/llplugin/llpluginprocessparent.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/linden/indra/llplugin/llpluginprocessparent.cpp b/linden/indra/llplugin/llpluginprocessparent.cpp index 8fd18ef..ecb2262 100755 --- a/linden/indra/llplugin/llpluginprocessparent.cpp +++ b/linden/indra/llplugin/llpluginprocessparent.cpp | |||
@@ -119,7 +119,7 @@ LLPluginProcessParent::LLPluginProcessParent(LLPluginProcessParentOwner *owner): | |||
119 | 119 | ||
120 | LLPluginProcessParent::~LLPluginProcessParent() | 120 | LLPluginProcessParent::~LLPluginProcessParent() |
121 | { | 121 | { |
122 | LL_DEBUGS("Plugin") << "destructor" << LL_ENDL; | 122 | LL_DEBUGS("PluginParent") << "destructor" << LL_ENDL; |
123 | 123 | ||
124 | // Remove from the global list before beginning destruction. | 124 | // Remove from the global list before beginning destruction. |
125 | { | 125 | { |
@@ -264,10 +264,10 @@ void LLPluginProcessParent::idle(void) | |||
264 | else if(mSocketError != APR_SUCCESS) | 264 | else if(mSocketError != APR_SUCCESS) |
265 | { | 265 | { |
266 | // The socket is in an error state -- the plugin is gone. | 266 | // The socket is in an error state -- the plugin is gone. |
267 | LL_WARNS("Plugin") << "Socket hit an error state (" << mSocketError << ")" << LL_ENDL; | 267 | LL_WARNS("PluginParent") << "Socket hit an error state (" << mSocketError << ")" << LL_ENDL; |
268 | errorState(); | 268 | errorState(); |
269 | } | 269 | } |
270 | } | 270 | } |
271 | 271 | ||
272 | // If a state needs to go directly to another state (as a performance enhancement), it can set idle_again to true after calling setState(). | 272 | // If a state needs to go directly to another state (as a performance enhancement), it can set idle_again to true after calling setState(). |
273 | // USE THIS CAREFULLY, since it can starve other code. Specifically make sure there's no way to get into a closed cycle and never return. | 273 | // USE THIS CAREFULLY, since it can starve other code. Specifically make sure there's no way to get into a closed cycle and never return. |
@@ -327,15 +327,15 @@ void LLPluginProcessParent::idle(void) | |||
327 | 327 | ||
328 | if(mBoundPort == 0) | 328 | if(mBoundPort == 0) |
329 | { | 329 | { |
330 | LL_WARNS("Plugin") << "Bound port number unknown, bailing out." << LL_ENDL; | 330 | LL_WARNS("PluginParent") << "Bound port number unknown, bailing out." << LL_ENDL; |
331 | 331 | ||
332 | killSockets(); | 332 | killSockets(); |
333 | errorState(); | 333 | errorState(); |
334 | break; | 334 | break; |
335 | } | 335 | } |
336 | } | 336 | } |
337 | 337 | ||
338 | LL_DEBUGS("Plugin") << "Bound tcp socket to port: " << addr->port << LL_ENDL; | 338 | LL_DEBUGS("PluginParent") << "Bound tcp socket to port: " << addr->port << LL_ENDL; |
339 | 339 | ||
340 | // Make the listen socket non-blocking | 340 | // Make the listen socket non-blocking |
341 | status = apr_socket_opt_set(mListenSocket->getSocket(), APR_SO_NONBLOCK, 1); | 341 | status = apr_socket_opt_set(mListenSocket->getSocket(), APR_SO_NONBLOCK, 1); |
@@ -458,8 +458,8 @@ void LLPluginProcessParent::idle(void) | |||
458 | break; | 458 | break; |
459 | 459 | ||
460 | case STATE_HELLO: | 460 | case STATE_HELLO: |
461 | LL_DEBUGS("Plugin") << "received hello message" << LL_ENDL; | 461 | LL_DEBUGS("PluginParent") << "received hello message" << LL_ENDL; |
462 | 462 | ||
463 | // Send the message to load the plugin | 463 | // Send the message to load the plugin |
464 | { | 464 | { |
465 | LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_INTERNAL, "load_plugin"); | 465 | LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_INTERNAL, "load_plugin"); |
@@ -492,7 +492,7 @@ void LLPluginProcessParent::idle(void) | |||
492 | } | 492 | } |
493 | else if(pluginLockedUp()) | 493 | else if(pluginLockedUp()) |
494 | { | 494 | { |
495 | LL_WARNS("Plugin") << "timeout in exiting state, bailing out" << LL_ENDL; | 495 | LL_WARNS("PluginParent") << "timeout in exiting state, bailing out" << LL_ENDL; |
496 | errorState(); | 496 | errorState(); |
497 | } | 497 | } |
498 | break; | 498 | break; |
@@ -589,11 +589,11 @@ void LLPluginProcessParent::sendMessage(const LLPluginMessage &message) | |||
589 | // reset the heartbeat timer, since there will have been no heartbeats while the plugin was blocked. | 589 | // reset the heartbeat timer, since there will have been no heartbeats while the plugin was blocked. |
590 | mHeartbeat.setTimerExpirySec(mPluginLockupTimeout); | 590 | mHeartbeat.setTimerExpirySec(mPluginLockupTimeout); |
591 | } | 591 | } |
592 | 592 | ||
593 | std::string buffer = message.generate(); | 593 | std::string buffer = message.generate(); |
594 | LL_DEBUGS("Plugin") << "Sending: " << buffer << LL_ENDL; | 594 | LL_DEBUGS("PluginParent") << "Sending: " << buffer << LL_ENDL; |
595 | writeMessageRaw(buffer); | 595 | writeMessageRaw(buffer); |
596 | 596 | ||
597 | // Try to send message immediately. | 597 | // Try to send message immediately. |
598 | if(mMessagePipe) | 598 | if(mMessagePipe) |
599 | { | 599 | { |
@@ -851,8 +851,8 @@ void LLPluginProcessParent::servicePoll() | |||
851 | 851 | ||
852 | void LLPluginProcessParent::receiveMessageRaw(const std::string &message) | 852 | void LLPluginProcessParent::receiveMessageRaw(const std::string &message) |
853 | { | 853 | { |
854 | LL_DEBUGS("Plugin") << "Received: " << message << LL_ENDL; | 854 | LL_DEBUGS("PluginParent") << "Received: " << message << LL_ENDL; |
855 | 855 | ||
856 | LLPluginMessage parsed; | 856 | LLPluginMessage parsed; |
857 | if(parsed.parse(message) != -1) | 857 | if(parsed.parse(message) != -1) |
858 | { | 858 | { |
@@ -918,19 +918,19 @@ void LLPluginProcessParent::receiveMessage(const LLPluginMessage &message) | |||
918 | } | 918 | } |
919 | else | 919 | else |
920 | { | 920 | { |
921 | LL_WARNS("Plugin") << "received hello message in wrong state -- bailing out" << LL_ENDL; | 921 | LL_WARNS("PluginParent") << "received hello message in wrong state -- bailing out" << LL_ENDL; |
922 | errorState(); | 922 | errorState(); |
923 | } | 923 | } |
924 | 924 | ||
925 | } | 925 | } |
926 | else if(message_name == "load_plugin_response") | 926 | else if(message_name == "load_plugin_response") |
927 | { | 927 | { |
928 | if(mState == STATE_LOADING) | 928 | if(mState == STATE_LOADING) |
929 | { | 929 | { |
930 | // Plugin has been loaded. | 930 | // Plugin has been loaded. |
931 | 931 | ||
932 | mPluginVersionString = message.getValue("plugin_version"); | 932 | mPluginVersionString = message.getValue("plugin_version"); |
933 | LL_INFOS("Plugin") << "plugin version string: " << mPluginVersionString << LL_ENDL; | 933 | LL_INFOS("PluginParent") << "plugin version string: " << mPluginVersionString << LL_ENDL; |
934 | 934 | ||
935 | // Check which message classes/versions the plugin supports. | 935 | // Check which message classes/versions the plugin supports. |
936 | // TODO: check against current versions | 936 | // TODO: check against current versions |
@@ -939,9 +939,9 @@ void LLPluginProcessParent::receiveMessage(const LLPluginMessage &message) | |||
939 | LLSD::map_iterator iter; | 939 | LLSD::map_iterator iter; |
940 | for(iter = mMessageClassVersions.beginMap(); iter != mMessageClassVersions.endMap(); iter++) | 940 | for(iter = mMessageClassVersions.beginMap(); iter != mMessageClassVersions.endMap(); iter++) |
941 | { | 941 | { |
942 | LL_INFOS("Plugin") << "message class: " << iter->first << " -> version: " << iter->second.asString() << LL_ENDL; | 942 | LL_INFOS("PluginParent") << "message class: " << iter->first << " -> version: " << iter->second.asString() << LL_ENDL; |
943 | } | 943 | } |
944 | 944 | ||
945 | // Send initial sleep time | 945 | // Send initial sleep time |
946 | setSleepTime(mSleepTime, true); | 946 | setSleepTime(mSleepTime, true); |
947 | 947 | ||
@@ -949,7 +949,7 @@ void LLPluginProcessParent::receiveMessage(const LLPluginMessage &message) | |||
949 | } | 949 | } |
950 | else | 950 | else |
951 | { | 951 | { |
952 | LL_WARNS("Plugin") << "received load_plugin_response message in wrong state -- bailing out" << LL_ENDL; | 952 | LL_WARNS("PluginParent") << "received load_plugin_response message in wrong state -- bailing out" << LL_ENDL; |
953 | errorState(); | 953 | errorState(); |
954 | } | 954 | } |
955 | } | 955 | } |
@@ -960,8 +960,8 @@ void LLPluginProcessParent::receiveMessage(const LLPluginMessage &message) | |||
960 | 960 | ||
961 | mCPUUsage = message.getValueReal("cpu_usage"); | 961 | mCPUUsage = message.getValueReal("cpu_usage"); |
962 | 962 | ||
963 | LL_DEBUGS("Plugin") << "cpu usage reported as " << mCPUUsage << LL_ENDL; | 963 | LL_DEBUGS("PluginSpam") << "cpu usage reported as " << mCPUUsage << LL_ENDL; |
964 | 964 | ||
965 | } | 965 | } |
966 | else if(message_name == "shm_add_response") | 966 | else if(message_name == "shm_add_response") |
967 | { | 967 | { |
@@ -983,7 +983,7 @@ void LLPluginProcessParent::receiveMessage(const LLPluginMessage &message) | |||
983 | } | 983 | } |
984 | else | 984 | else |
985 | { | 985 | { |
986 | LL_WARNS("Plugin") << "Unknown internal message from child: " << message_name << LL_ENDL; | 986 | LL_WARNS("PluginParent") << "Unknown internal message from child: " << message_name << LL_ENDL; |
987 | } | 987 | } |
988 | } | 988 | } |
989 | else | 989 | else |
@@ -1015,7 +1015,7 @@ std::string LLPluginProcessParent::addSharedMemory(size_t size) | |||
1015 | } | 1015 | } |
1016 | else | 1016 | else |
1017 | { | 1017 | { |
1018 | LL_WARNS("Plugin") << "Couldn't create a shared memory segment!" << LL_ENDL; | 1018 | LL_WARNS("PluginParent") << "Couldn't create a shared memory segment!" << LL_ENDL; |
1019 | 1019 | ||
1020 | // Don't leak | 1020 | // Don't leak |
1021 | delete region; | 1021 | delete region; |
@@ -1037,7 +1037,7 @@ void LLPluginProcessParent::removeSharedMemory(const std::string &name) | |||
1037 | } | 1037 | } |
1038 | else | 1038 | else |
1039 | { | 1039 | { |
1040 | LL_WARNS("Plugin") << "Request to remove an unknown shared memory segment." << LL_ENDL; | 1040 | LL_WARNS("PluginParent") << "Request to remove an unknown shared memory segment." << LL_ENDL; |
1041 | } | 1041 | } |
1042 | } | 1042 | } |
1043 | size_t LLPluginProcessParent::getSharedMemorySize(const std::string &name) | 1043 | size_t LLPluginProcessParent::getSharedMemorySize(const std::string &name) |
@@ -1084,25 +1084,25 @@ std::string LLPluginProcessParent::getPluginVersion(void) | |||
1084 | 1084 | ||
1085 | void LLPluginProcessParent::setState(EState state) | 1085 | void LLPluginProcessParent::setState(EState state) |
1086 | { | 1086 | { |
1087 | LL_DEBUGS("Plugin") << "setting state to " << stateToString(state) << LL_ENDL; | 1087 | LL_DEBUGS("PluginParent") << "setting state to " << stateToString(state) << LL_ENDL; |
1088 | mState = state; | 1088 | mState = state; |
1089 | }; | 1089 | }; |
1090 | 1090 | ||
1091 | bool LLPluginProcessParent::pluginLockedUpOrQuit() | 1091 | bool LLPluginProcessParent::pluginLockedUpOrQuit() |
1092 | { | 1092 | { |
1093 | bool result = false; | 1093 | bool result = false; |
1094 | 1094 | ||
1095 | if(!mProcess.isRunning()) | 1095 | if(!mProcess.isRunning()) |
1096 | { | 1096 | { |
1097 | LL_WARNS("Plugin") << "child exited" << LL_ENDL; | 1097 | LL_WARNS("PluginParent") << "child exited" << LL_ENDL; |
1098 | result = true; | 1098 | result = true; |
1099 | } | 1099 | } |
1100 | else if(pluginLockedUp()) | 1100 | else if(pluginLockedUp()) |
1101 | { | 1101 | { |
1102 | LL_WARNS("Plugin") << "timeout" << LL_ENDL; | 1102 | LL_WARNS("PluginParent") << "timeout" << LL_ENDL; |
1103 | result = true; | 1103 | result = true; |
1104 | } | 1104 | } |
1105 | 1105 | ||
1106 | return result; | 1106 | return result; |
1107 | } | 1107 | } |
1108 | 1108 | ||