summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorEric Tulla <tulla@lindenlab.com>2008-05-14 21:37:13 +0000
committerEric Tulla <tulla@lindenlab.com>2008-05-14 21:37:13 +0000
commite77de5d685ae441f72920f0e04d9887ee958745a (patch)
treeb3736831042b20be198dc9994ba68db1e8be2a14 /indra/newview
parent41e1ed5b4153019b07d97f54751db53fa248d8d4 (diff)
Result of svn merge -r 87455:87538 $SVN/branches/tulla/vc3-merge .
Passed QA as part of QAR-491.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/cmd_line.xml670
-rw-r--r--indra/newview/app_settings/logcontrol.xml47
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llappviewer.cpp131
-rw-r--r--indra/newview/llappviewer.h9
-rw-r--r--indra/newview/llappviewermacosx.cpp13
-rw-r--r--indra/newview/llappviewerwin32.cpp36
-rw-r--r--indra/newview/lldrawable.cpp2
-rw-r--r--indra/newview/llfeaturemanager.cpp58
-rw-r--r--indra/newview/llpanellogin.h1
-rw-r--r--indra/newview/llstartup.cpp156
-rw-r--r--indra/newview/lltexturecache.cpp26
-rw-r--r--indra/newview/llviewerjointmesh.cpp6
-rw-r--r--indra/newview/llviewermenu.cpp2
-rw-r--r--indra/newview/llviewermessage.cpp221
-rw-r--r--indra/newview/llviewerregion.cpp8
-rw-r--r--indra/newview/llviewerthrottle.cpp4
-rw-r--r--indra/newview/llviewerwindow.cpp12
-rw-r--r--indra/newview/llvoiceclient.cpp222
-rw-r--r--indra/newview/llwatchdog.cpp193
-rw-r--r--indra/newview/llwatchdog.h95
-rw-r--r--indra/newview/llwaterparammanager.cpp6
-rw-r--r--indra/newview/llwindebug.cpp154
-rw-r--r--indra/newview/llwindebug.h30
-rw-r--r--indra/newview/llwlparammanager.cpp8
-rw-r--r--indra/newview/llworld.cpp6
-rw-r--r--indra/newview/llxmlrpctransaction.cpp8
27 files changed, 1264 insertions, 871 deletions
diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml
index 3e6fa21cc6..ec12794bc5 100644
--- a/indra/newview/app_settings/cmd_line.xml
+++ b/indra/newview/app_settings/cmd_line.xml
@@ -1,335 +1,335 @@
-<?xml version="1.0"?>
-<llsd>
- <map>
- <key>help</key>
- <map>
- <key>desc</key>
- <string>display this help message</string>
-
- <key>short</key>
- <string>h</string>
- </map>
-
- <key>port</key>
- <map>
- <key>count</key>
- <integer>1</integer>
- <key>map-to</key>
- <string>UserConnectionPort</string>
- </map>
-
- <key>drop</key>
- <map>
- <key>count</key>
- <integer>1</integer>
- <key>map-to</key>
- <string>PacketDropPercentage</string>
- </map>
-
- <key>inbw</key>
- <map>
- <key>count</key>
- <integer>1</integer>
- <key>map-to</key>
- <string>InBandwidth</string>
- </map>
-
- <key>outbw</key>
- <map>
- <key>count</key>
- <integer>1</integer>
- <key>map-to</key>
- <string>OutBandwidth</string>
- </map>
-
- <key>grid</key>
- <map>
- <key>desc</key>
- <string>Specify the name of the grid, local, or an IP address to connect to.</string>
- <key>count</key>
- <integer>1</integer>
- <key>map-to</key>
- <string>GridChoice</string>
- </map>
-
- <key>loginuri</key>
- <map>
- <key>desc</key>
- <string>login server and CGI script to use</string>
- <key>count</key>
- <integer>1</integer>
- <key>compose</key>
- <boolean>true</boolean>
- <key>map-to</key>
- <string>LoginURI</string>
- </map>
-
- <key>helperuri</key>
- <map>
- <key>desc</key>
- <string>helper web CGI prefix to use</string>
- <key>count</key>
- <integer>1</integer>
- <key>map-to</key>
- <string>HelperURI</string>
- </map>
-
- <key>debugviews</key>
- <map>
- <key>map-to</key>
- <string>DebugViews</string>
- </map>
-
- <key>skin</key>
- <map>
- <key>desc</key>
- <string>ui/branding skin folder to use</string>
- <key>count</key>
- <integer>1</integer>
- <key>map-to</key>
- <string>SkinFolder</string>
- </map>
-
- <key>autologin</key>
- <map>
- <key>desc</key>
- <string>log in as last saved user</string>
- <key>map-to</key>
- <string>AutoLogin</string>
- </map>
-
- <key>quitafter</key>
- <map>
- <key>count</key>
- <integer>1</integer>
- <key>map-to</key>
- <string>QuitAfterSeconds</string>
- </map>
-
- <key>rotate</key>
- <map>
- <key>map-to</key>
- <string>RotateRight</string>
- </map>
-
- <key>noaudio</key>
- <map>
- <key>map-to</key>
- <string>NoAudio</string>
- </map>
-
- <key>nosound</key>
- <map>
- <key>map-to</key>
- <string>NoAudio</string>
- </map>
-
- <key>noprobe</key>
- <map>
- <key>map-to</key>
- <string>NoHardwareProbe</string>
- </map>
-
- <key>noquicktime</key>
- <map>
- <key>map-to</key>
- <string>NoQuickTime</string>
- </map>
-
- <key>nopreload</key>
- <map>
- <key>map-to</key>
- <string>NoPreload</string>
- </map>
-
- <key>purge</key>
- <map>
- <key>desc</key>
- <string>Delete files in the cache.</string>
- <key>map-to</key>
- <string>PurgeCacheOnNextStartup</string>
- </map>
-
- <key>noinvlib</key>
- <map>
- <key>desc</key>
- <string>Do not request the inventory library.</string>
- <key>map-to</key>
- <string>NoInventoryLibrary</string>
- </map>
-
- <key>logfile</key>
- <map>
- <key>count</key>
- <integer>1</integer>
- <key>map-to</key>
- <string>UserLogFile</string>
- </map>
-
- <key>setdefault</key>
- <map>
- <key>desc</key>
- <string> specify the value of a particular
- configuration variable which can be
- overridden by settings.xml
- </string>
- <key>count</key>
- <integer>2</integer>
- <!-- Special case. Mapped to settings procedurally. -->
- </map>
-
- <key>set</key>
- <map>
- <key>desc</key>
- <string> specify the value of a particular
- configuration variable that
- overrides all other settings
- </string>
- <key>count</key>
- <integer>2</integer>
- <!-- Special case. Mapped to settings procedurally. -->
- </map>
-
- <key>settings</key>
- <map>
- <key>desc</key>
- <string>Specify the filename of a configuration file.</string>
- <key>count</key>
- <integer>1</integer>
- <!-- Special case. Mapped to settings procedurally. -->
- </map>
-
- <key>login</key>
- <map>
- <key>desc</key>
- <string>3 tokens: first, last and password</string>
- <key>count</key>
- <integer>3</integer>
- <key>map-to</key>
- <string>UserLoginInfo</string>
- </map>
-
- <key>god</key>
- <map>
- <key>desc</key>
- <string>Log in a god if you have god access.</string>
- <key>map-to</key>
- <string>ConnectAsGod</string>
- </map>
-
- <key>console</key>
- <map>
- <key>count</key>
- <integer>1</integer>
- <key>map-to</key>
- <string>ShowConsoleWindow</string>
- </map>
-
- <key>safe</key>
- <map>
- <key>desc</key>
- <string>Reset preferences, run in safe mode.</string>
- <key>map-to</key>
- <string>SafeMode</string>
- </map>
-
- <key>multiple</key>
- <map>
- <key>desc</key>
- <string>Allow multple viewers.</string>
- <key>map-to</key>
- <string>AllowMultipleViewers</string>
- </map>
-
- <key>novoice</key>
- <map>
- <key>desc</key>
- <string>Disable voice.</string>
- <key>map-to</key>
- <string>CmdLineDisableVoice</string>
- </map>
-
- <key>url</key>
- <map>
- <key>desc</key>
- <string>Startup location</string>
- <key>count</key>
- <integer>1</integer>
- <key>last_option</key>
- <boolean>true</boolean>
- <!-- Special case. Not mapped to a setting. -->
- </map>
-
- <key>slurl</key>
- <map>
- <key>desc</key>
- <string>Startup SLurl</string>
- <key>count</key>
- <integer>1</integer>
- <key>positional</key>
- <boolean>true</boolean>
- <key>last_option</key>
- <boolean>true</boolean>
- <!-- Special case. Not mapped to a setting. -->
- </map>
-
- <key>ignorepixeldepth</key>
- <map>
- <key>desc</key>
- <string>Ignore pixel depth settings.</string>
- <key>map-to</key>
- <string>IgnorePixelDepth</string>
- </map>
-
- <key>cooperative</key>
- <map>
- <key>desc</key>
- <string>Yield some idle time to local host.</string>
- <key>count</key>
- <integer>1</integer>
- <key>map-to</key>
- <string>YieldTime</string>
- </map>
-
- <key>no-verify-ssl-cert</key>
- <map>
- <key>map-to</key>
- <string>NoVerifySSLCert</string>
- </map>
-
- <key>channel</key>
- <map>
- <key>count</key>
- <integer>1</integer>
- <key>map-to</key>
- <string>VersionChannelName</string>
- </map>
-
- <key>loginpage</key>
- <map>
- <key>desc</key>
- <string>Login authentication page to use.</string>
- <key>count</key>
- <integer>1</integer>
- <key>map-to</key>
- <string>LoginPage</string>
- </map>
-
- <key>qa</key>
- <map>
- <key>desc</key>
- <string>Activated debugging menu in Advanced Settings.</string>
- <key>map-to</key>
- <string>QAMode</string>
- </map>
-
- <key>crashonstartup</key>
- <map>
- <key>desc</key>
- <string>Crashes on startup. For QA use.</string>
- <key>map-to</key>
- <string>CrashOnStartup</string>
- </map>
-
- </map>
-</llsd>
+<?xml version="1.0"?>
+<llsd>
+ <map>
+ <key>help</key>
+ <map>
+ <key>desc</key>
+ <string>display this help message</string>
+
+ <key>short</key>
+ <string>h</string>
+ </map>
+
+ <key>port</key>
+ <map>
+ <key>count</key>
+ <integer>1</integer>
+ <key>map-to</key>
+ <string>UserConnectionPort</string>
+ </map>
+
+ <key>drop</key>
+ <map>
+ <key>count</key>
+ <integer>1</integer>
+ <key>map-to</key>
+ <string>PacketDropPercentage</string>
+ </map>
+
+ <key>inbw</key>
+ <map>
+ <key>count</key>
+ <integer>1</integer>
+ <key>map-to</key>
+ <string>InBandwidth</string>
+ </map>
+
+ <key>outbw</key>
+ <map>
+ <key>count</key>
+ <integer>1</integer>
+ <key>map-to</key>
+ <string>OutBandwidth</string>
+ </map>
+
+ <key>grid</key>
+ <map>
+ <key>desc</key>
+ <string>Specify the name of the grid, local, or an IP address to connect to.</string>
+ <key>count</key>
+ <integer>1</integer>
+ <key>map-to</key>
+ <string>GridChoice</string>
+ </map>
+
+ <key>loginuri</key>
+ <map>
+ <key>desc</key>
+ <string>login server and CGI script to use</string>
+ <key>count</key>
+ <integer>1</integer>
+ <key>compose</key>
+ <boolean>true</boolean>
+ <key>map-to</key>
+ <string>LoginURI</string>
+ </map>
+
+ <key>helperuri</key>
+ <map>
+ <key>desc</key>
+ <string>helper web CGI prefix to use</string>
+ <key>count</key>
+ <integer>1</integer>
+ <key>map-to</key>
+ <string>HelperURI</string>
+ </map>
+
+ <key>debugviews</key>
+ <map>
+ <key>map-to</key>
+ <string>DebugViews</string>
+ </map>
+
+ <key>skin</key>
+ <map>
+ <key>desc</key>
+ <string>ui/branding skin folder to use</string>
+ <key>count</key>
+ <integer>1</integer>
+ <key>map-to</key>
+ <string>SkinFolder</string>
+ </map>
+
+ <key>autologin</key>
+ <map>
+ <key>desc</key>
+ <string>log in as last saved user</string>
+ <key>map-to</key>
+ <string>AutoLogin</string>
+ </map>
+
+ <key>quitafter</key>
+ <map>
+ <key>count</key>
+ <integer>1</integer>
+ <key>map-to</key>
+ <string>QuitAfterSeconds</string>
+ </map>
+
+ <key>rotate</key>
+ <map>
+ <key>map-to</key>
+ <string>RotateRight</string>
+ </map>
+
+ <key>noaudio</key>
+ <map>
+ <key>map-to</key>
+ <string>NoAudio</string>
+ </map>
+
+ <key>nosound</key>
+ <map>
+ <key>map-to</key>
+ <string>NoAudio</string>
+ </map>
+
+ <key>noprobe</key>
+ <map>
+ <key>map-to</key>
+ <string>NoHardwareProbe</string>
+ </map>
+
+ <key>noquicktime</key>
+ <map>
+ <key>map-to</key>
+ <string>NoQuickTime</string>
+ </map>
+
+ <key>nopreload</key>
+ <map>
+ <key>map-to</key>
+ <string>NoPreload</string>
+ </map>
+
+ <key>purge</key>
+ <map>
+ <key>desc</key>
+ <string>Delete files in the cache.</string>
+ <key>map-to</key>
+ <string>PurgeCacheOnNextStartup</string>
+ </map>
+
+ <key>noinvlib</key>
+ <map>
+ <key>desc</key>
+ <string>Do not request the inventory library.</string>
+ <key>map-to</key>
+ <string>NoInventoryLibrary</string>
+ </map>
+
+ <key>logfile</key>
+ <map>
+ <key>count</key>
+ <integer>1</integer>
+ <key>map-to</key>
+ <string>UserLogFile</string>
+ </map>
+
+ <key>setdefault</key>
+ <map>
+ <key>desc</key>
+ <string> specify the value of a particular
+ configuration variable which can be
+ overridden by settings.xml
+ </string>
+ <key>count</key>
+ <integer>2</integer>
+ <!-- Special case. Mapped to settings procedurally. -->
+ </map>
+
+ <key>set</key>
+ <map>
+ <key>desc</key>
+ <string> specify the value of a particular
+ configuration variable that
+ overrides all other settings
+ </string>
+ <key>count</key>
+ <integer>2</integer>
+ <!-- Special case. Mapped to settings procedurally. -->
+ </map>
+
+ <key>settings</key>
+ <map>
+ <key>desc</key>
+ <string>Specify the filename of a configuration file.</string>
+ <key>count</key>
+ <integer>1</integer>
+ <!-- Special case. Mapped to settings procedurally. -->
+ </map>
+
+ <key>login</key>
+ <map>
+ <key>desc</key>
+ <string>3 tokens: first, last and password</string>
+ <key>count</key>
+ <integer>3</integer>
+ <key>map-to</key>
+ <string>UserLoginInfo</string>
+ </map>
+
+ <key>god</key>
+ <map>
+ <key>desc</key>
+ <string>Log in a god if you have god access.</string>
+ <key>map-to</key>
+ <string>ConnectAsGod</string>
+ </map>
+
+ <key>console</key>
+ <map>
+ <key>count</key>
+ <integer>1</integer>
+ <key>map-to</key>
+ <string>ShowConsoleWindow</string>
+ </map>
+
+ <key>safe</key>
+ <map>
+ <key>desc</key>
+ <string>Reset preferences, run in safe mode.</string>
+ <key>map-to</key>
+ <string>SafeMode</string>
+ </map>
+
+ <key>multiple</key>
+ <map>
+ <key>desc</key>
+ <string>Allow multple viewers.</string>
+ <key>map-to</key>
+ <string>AllowMultipleViewers</string>
+ </map>
+
+ <key>novoice</key>
+ <map>
+ <key>desc</key>
+ <string>Disable voice.</string>
+ <key>map-to</key>
+ <string>CmdLineDisableVoice</string>
+ </map>
+
+ <key>url</key>
+ <map>
+ <key>desc</key>
+ <string>Startup location</string>
+ <key>count</key>
+ <integer>1</integer>
+ <key>last_option</key>
+ <boolean>true</boolean>
+ <!-- Special case. Not mapped to a setting. -->
+ </map>
+
+ <key>slurl</key>
+ <map>
+ <key>desc</key>
+ <string>Startup SLurl</string>
+ <key>count</key>
+ <integer>1</integer>
+ <key>positional</key>
+ <boolean>true</boolean>
+ <key>last_option</key>
+ <boolean>true</boolean>
+ <!-- Special case. Not mapped to a setting. -->
+ </map>
+
+ <key>ignorepixeldepth</key>
+ <map>
+ <key>desc</key>
+ <string>Ignore pixel depth settings.</string>
+ <key>map-to</key>
+ <string>IgnorePixelDepth</string>
+ </map>
+
+ <key>cooperative</key>
+ <map>
+ <key>desc</key>
+ <string>Yield some idle time to local host.</string>
+ <key>count</key>
+ <integer>1</integer>
+ <key>map-to</key>
+ <string>YieldTime</string>
+ </map>
+
+ <key>no-verify-ssl-cert</key>
+ <map>
+ <key>map-to</key>
+ <string>NoVerifySSLCert</string>
+ </map>
+
+ <key>channel</key>
+ <map>
+ <key>count</key>
+ <integer>1</integer>
+ <key>map-to</key>
+ <string>VersionChannelName</string>
+ </map>
+
+ <key>loginpage</key>
+ <map>
+ <key>desc</key>
+ <string>Login authentication page to use.</string>
+ <key>count</key>
+ <integer>1</integer>
+ <key>map-to</key>
+ <string>LoginPage</string>
+ </map>
+
+ <key>qa</key>
+ <map>
+ <key>desc</key>
+ <string>Activated debugging menu in Advanced Settings.</string>
+ <key>map-to</key>
+ <string>QAMode</string>
+ </map>
+
+ <key>crashonstartup</key>
+ <map>
+ <key>desc</key>
+ <string>Crashes on startup. For QA use.</string>
+ <key>map-to</key>
+ <string>CrashOnStartup</string>
+ </map>
+
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/logcontrol.xml b/indra/newview/app_settings/logcontrol.xml
new file mode 100644
index 0000000000..d7bb64ce8a
--- /dev/null
+++ b/indra/newview/app_settings/logcontrol.xml
@@ -0,0 +1,47 @@
+<llsd>
+ <map>
+ <!-- default-level can be ALL, DEBUG, INFO, WARN, ERROR, or NONE -->
+ <key>default-level</key> <string>INFO</string>
+ <key>print-location</key> <boolean>false</boolean>
+ <key>settings</key>
+ <array>
+ <!-- sample entry for changing settings on specific items -->
+ <map>
+ <key>level</key><string>INFO</string>
+ <key>functions</key>
+ <array>
+ </array>
+ <key>classes</key>
+ <array>
+ </array>
+ <key>files</key>
+ <array>
+ </array>
+ <key>tags</key>
+ <array>
+ <string>AppInit</string>
+ <string>SystemInfo</string>
+ <string>TextureCache</string>
+ <string>AppCache</string>
+ <string>Window</string>
+ <string>RenderInit</string>
+ </array>
+ </map>
+ <map>
+ <key>level</key><string>DEBUG</string>
+ <key>functions</key>
+ <array>
+ </array>
+ <key>classes</key>
+ <array>
+ </array>
+ <key>files</key>
+ <array>
+ </array>
+ <key>tags</key>
+ <array>
+ </array>
+ </map>
+ </array>
+ </map>
+</llsd>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 2d391c4416..d895d7e991 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4072,6 +4072,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>MainloopTimeoutDefault</key>
+ <map>
+ <key>Comment</key>
+ <string>Timeout duration for mainloop lock detection, in seconds.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>10.0</real>
+ </map>
<key>MapOverlayIndex</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index b8adfe5477..b1b59a71f8 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -122,6 +122,7 @@
#include "llhudeffecttrail.h"
#include "llvectorperfoptions.h"
#include "llurlsimstring.h"
+#include "llwatchdog.h"
// Included so that constants/settings might be initialized
// in save_settings_to_globals()
@@ -593,10 +594,16 @@ LLAppViewer::LLAppViewer() :
}
sInstance = this;
+
+ // Initialize the mainloop timeout.
+ mMainloopTimeout = new LLWatchdogTimeout();
}
LLAppViewer::~LLAppViewer()
{
+ // Initialize the mainloop timeout.
+ delete mMainloopTimeout;
+
// If we got to this destructor somehow, the app didn't hang.
removeMarkerFile();
}
@@ -650,7 +657,7 @@ bool LLAppViewer::init()
//
// Various introspection concerning the libs we're using.
//
- llinfos << "J2C Engine is: " << LLImageJ2C::getEngineInfo() << llendl;
+ LL_DEBUGS("InitInfo") << "J2C Engine is: " << LLImageJ2C::getEngineInfo() << LL_ENDL;
// Get the single value from the crash settings file, if it exists
std::string crash_settings_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, CRASH_SETTINGS_FILE);
@@ -693,15 +700,15 @@ bool LLAppViewer::init()
// Load art UUID information, don't require these strings to be declared in code.
LLString colors_base_filename = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "colors_base.xml");
- llinfos << "Loading base colors from " << colors_base_filename << llendl;
+ LL_DEBUGS("InitInfo") << "Loading base colors from " << colors_base_filename << LL_ENDL;
gColors.loadFromFileLegacy(colors_base_filename.c_str(), FALSE, TYPE_COL4U);
// Load overrides from user colors file
LLString user_colors_filename = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "colors.xml");
- llinfos << "Loading user colors from " << user_colors_filename << llendl;
+ LL_DEBUGS("InitInfo") << "Loading user colors from " << user_colors_filename << LL_ENDL;
if (gColors.loadFromFileLegacy(user_colors_filename.c_str(), FALSE, TYPE_COL4U) == 0)
{
- llinfos << "Cannot load user colors from " << user_colors_filename << llendl;
+ LL_DEBUGS("InitInfo") << "Cannot load user colors from " << user_colors_filename << LL_ENDL;
}
// Widget construction depends on LLUI being initialized
@@ -792,7 +799,7 @@ bool LLAppViewer::init()
#endif
gGLManager.getGLInfo(gDebugInfo);
- llinfos << gGLManager.getGLInfoString() << llendl;
+ gGLManager.printGLInfoString();
//load key settings
bind_keyboard_functions();
@@ -800,7 +807,7 @@ bool LLAppViewer::init()
// Load Default bindings
if (!gViewerKeyboard.loadBindings(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"keys.ini").c_str()))
{
- llerrs << "Unable to open keys.ini" << llendl;
+ LL_ERRS("InitInfo") << "Unable to open keys.ini" << LL_ENDL;
}
// Load Custom bindings (override defaults)
gViewerKeyboard.loadBindings(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"custom_keys.ini").c_str());
@@ -881,6 +888,10 @@ bool LLAppViewer::init()
bool LLAppViewer::mainLoop()
{
+ mMainloopTimeout = new LLWatchdogTimeout();
+ // *FIX:Mani - Make this a setting, once new settings exist in this branch.
+ mMainloopTimeout->setTimeout(5);
+
//-------------------------------------------
// Run main loop until time to quit
//-------------------------------------------
@@ -912,7 +923,7 @@ bool LLAppViewer::mainLoop()
{
LLFastTimer t2(LLFastTimer::FTM_MESSAGES);
#if LL_WINDOWS
- if (!LLWinDebug::setupExceptionHandler())
+ if (!LLWinDebug::checkExceptionHandler())
{
llwarns << " Someone took over my exception handler (post messagehandling)!" << llendl;
}
@@ -1061,6 +1072,8 @@ bool LLAppViewer::mainLoop()
}
//LLVFSThread::sLocal->pause(); // Prevent the VFS thread from running while rendering.
//LLLFSThread::sLocal->pause(); // Prevent the LFS thread from running while rendering.
+
+ mMainloopTimeout->ping();
}
}
@@ -1085,6 +1098,8 @@ bool LLAppViewer::mainLoop()
delete gServicePump;
+ mMainloopTimeout->stop();
+
llinfos << "Exiting main_loop" << llendflush;
return true;
@@ -1348,7 +1363,9 @@ bool LLAppViewer::cleanup()
gStaticVFS = NULL;
delete gVFS;
gVFS = NULL;
-
+
+ LLWatchdog::getInstance()->cleanup();
+
end_messaging_system();
// *NOTE:Mani - The following call is not thread safe.
@@ -1382,6 +1399,9 @@ bool LLAppViewer::initThreads()
#else
static const bool enable_threads = true;
#endif
+
+ LLWatchdog::getInstance()->init();
+
LLVFSThread::initClass(enable_threads && true);
LLLFSThread::initClass(enable_threads && true);
@@ -1436,7 +1456,7 @@ bool LLAppViewer::initLogging()
}
void LLAppViewer::loadSettingsFromDirectory(ELLPath path_index)
-{
+{
for(LLSD::map_iterator itr = mSettingsFileList.beginMap(); itr != mSettingsFileList.endMap(); ++itr)
{
LLString settings_name = (*itr).first;
@@ -1489,7 +1509,7 @@ std::string LLAppViewer::getSettingsFileName(const std::string& file)
}
bool LLAppViewer::initConfiguration()
-{
+{
//Set up internal pointers
gSettings[sGlobalSettingsName] = &gSavedSettings;
gSettings[sPerAccountSettingsName] = &gSavedPerAccountSettings;
@@ -2023,7 +2043,7 @@ bool LLAppViewer::initConfiguration()
bool LLAppViewer::initWindow()
{
- llinfos << "Initializing window..." << llendl;
+ LL_INFOS("AppInit") << "Initializing window..." << LL_ENDL;
// store setting in a global for easy access and modification
gNoRender = gSavedSettings.getBOOL("DisableRendering");
@@ -2193,22 +2213,22 @@ void LLAppViewer::writeSystemInfo()
gDebugInfo["OSInfo"] = getOSInfo().getOSStringSimple();
// Dump some debugging info
- llinfos << gSecondLife
+ LL_INFOS("SystemInfo") << gSecondLife
<< " version " << LL_VERSION_MAJOR << "." << LL_VERSION_MINOR << "." << LL_VERSION_PATCH
- << llendl;
+ << LL_ENDL;
// Dump the local time and time zone
time_t now;
time(&now);
char tbuffer[256]; /* Flawfinder: ignore */
strftime(tbuffer, 256, "%Y-%m-%dT%H:%M:%S %Z", localtime(&now));
- llinfos << "Local time: " << tbuffer << llendl;
+ LL_INFOS("SystemInfo") << "Local time: " << tbuffer << LL_ENDL;
// query some system information
- llinfos << "CPU info:\n" << gSysCPU << llendl;
- llinfos << "Memory info:\n" << gSysMemory << llendl;
- llinfos << "OS: " << getOSInfo().getOSStringSimple() << llendl;
- llinfos << "OS info: " << getOSInfo() << llendl;
+ LL_INFOS("SystemInfo") << "CPU info:\n" << gSysCPU << LL_ENDL;
+ LL_INFOS("SystemInfo") << "Memory info:\n" << gSysMemory << LL_ENDL;
+ LL_INFOS("SystemInfo") << "OS: " << getOSInfo().getOSStringSimple() << LL_ENDL;
+ LL_INFOS("SystemInfo") << "OS info: " << getOSInfo() << LL_ENDL;
}
void LLAppViewer::handleSyncViewerCrash()
@@ -2220,6 +2240,8 @@ void LLAppViewer::handleSyncViewerCrash()
void LLAppViewer::handleViewerCrash()
{
+ llinfos << "Handle viewer crash entry." << llendl;
+
LLAppViewer* pApp = LLAppViewer::instance();
if (pApp->beingDebugged())
{
@@ -2286,11 +2308,11 @@ void LLAppViewer::handleViewerCrash()
apr_file_t* crash_file = ll_apr_file_open(crash_file_name, LL_APR_W);
if (crash_file)
{
- llinfos << "Created crash marker file " << crash_file_name << llendl;
+ LL_INFOS("MarkerFile") << "Created crash marker file " << crash_file_name << LL_ENDL;
}
else
{
- llwarns << "Cannot create error marker file " << crash_file_name << llendl;
+ LL_WARNS("MarkerFile") << "Cannot create error marker file " << crash_file_name << LL_ENDL;
}
apr_file_close(crash_file);
}
@@ -2302,6 +2324,7 @@ void LLAppViewer::handleViewerCrash()
llofstream file(filename.c_str(), llofstream::binary);
if(file.good())
{
+ llinfos << "Handle viewer crash generating stats log." << llendl;
gMessageSystem->summarizeLogs(file);
file.close();
}
@@ -2317,6 +2340,7 @@ void LLAppViewer::handleViewerCrash()
// Close the debug file
pApp->closeDebug();
+
LLError::logToFile("");
// Remove the marker file, since otherwise we'll spawn a process that'll keep it locked
@@ -2347,7 +2371,7 @@ bool LLAppViewer::anotherInstanceRunning()
// If the file is currently locked, that means another process is already running.
std::string marker_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, MARKER_FILE_NAME);
- llinfos << "Checking marker file for lock..." << llendl;
+ LL_DEBUGS("MarkerFile") << "Checking marker file for lock..." << LL_ENDL;
//Freeze case checks
apr_file_t* fMarker = ll_apr_file_open(marker_file, LL_APR_RB);
@@ -2359,19 +2383,19 @@ bool LLAppViewer::anotherInstanceRunning()
if (fMarker == NULL)
{
// Another instance is running. Skip the rest of these operations.
- llinfos << "Marker file is locked." << llendl;
+ LL_INFOS("MarkerFile") << "Marker file is locked." << LL_ENDL;
return TRUE;
}
if (apr_file_lock(fMarker, APR_FLOCK_NONBLOCK | APR_FLOCK_EXCLUSIVE) != APR_SUCCESS) //flock(fileno(fMarker), LOCK_EX | LOCK_NB) == -1)
{
apr_file_close(fMarker);
- llinfos << "Marker file is locked." << llendl;
+ LL_INFOS("MarkerFile") << "Marker file is locked." << LL_ENDL;
return TRUE;
}
// No other instances; we'll lock this file now & delete on quit.
apr_file_close(fMarker);
}
- llinfos << "Marker file isn't locked." << llendl;
+ LL_DEBUGS("MarkerFile") << "Marker file isn't locked." << LL_ENDL;
return FALSE;
}
@@ -2382,7 +2406,7 @@ void LLAppViewer::initMarkerFile()
//There are marker files for two different types of crashes
mMarkerFileName = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,MARKER_FILE_NAME);
- llinfos << "Checking marker file for lock..." << llendl;
+ LL_DEBUGS("MarkerFile") << "Checking marker file for lock..." << LL_ENDL;
//We've got 4 things to test for here
// - Other Process Running (SecondLife.exec_marker present, locked)
@@ -2400,7 +2424,7 @@ void LLAppViewer::initMarkerFile()
if(fMarker != NULL)
{
apr_file_close(fMarker);
- llinfos << "Last exec LLError crashed, setting LastExecEvent to " << LAST_EXEC_LLERROR_CRASH << llendl;
+ LL_INFOS("MarkerFile") << "Last exec LLError crashed, setting LastExecEvent to " << LAST_EXEC_LLERROR_CRASH << LL_ENDL;
gLastExecEvent = LAST_EXEC_LOGOUT_FROZE;
}
fMarker = ll_apr_file_open(llerror_marker_file, LL_APR_RB);
@@ -2415,7 +2439,7 @@ void LLAppViewer::initMarkerFile()
if(fMarker != NULL)
{
apr_file_close(fMarker);
- llinfos << "Last exec crashed, setting LastExecEvent to " << LAST_EXEC_OTHER_CRASH << llendl;
+ LL_INFOS("MarkerFile") << "Last exec crashed, setting LastExecEvent to " << LAST_EXEC_OTHER_CRASH << LL_ENDL;
if(gLastExecEvent == LAST_EXEC_LOGOUT_FROZE) gLastExecEvent = LAST_EXEC_LOGOUT_CRASH;
else gLastExecEvent = LAST_EXEC_OTHER_CRASH;
}
@@ -2435,34 +2459,33 @@ void LLAppViewer::initMarkerFile()
{
apr_file_close(fMarker);
gLastExecEvent = LAST_EXEC_FROZE;
- llinfos << "Exec marker found: program froze on previous execution" << llendl;
+ LL_INFOS("MarkerFile") << "Exec marker found: program froze on previous execution" << LL_ENDL;
}
// Create the marker file for this execution & lock it
mMarkerFile = ll_apr_file_open(mMarkerFileName, LL_APR_W);
if (mMarkerFile)
{
- llinfos << "Marker file created." << llendl;
+ LL_DEBUGS("MarkerFile") << "Marker file created." << LL_ENDL;
}
else
{
- llinfos << "Failed to create marker file." << llendl;
+ LL_INFOS("MarkerFile") << "Failed to create marker file." << LL_ENDL;
return;
}
if (apr_file_lock(mMarkerFile, APR_FLOCK_NONBLOCK | APR_FLOCK_EXCLUSIVE) != APR_SUCCESS)
{
apr_file_close(mMarkerFile);
- llinfos << "Marker file cannot be locked." << llendl;
+ LL_INFOS("MarkerFile") << "Marker file cannot be locked." << LL_ENDL;
return;
}
- llinfos << "Marker file locked." << llendl;
- llinfos << "Exiting initMarkerFile()." << llendl;
+ LL_DEBUGS("MarkerFile") << "Marker file locked." << LL_ENDL;
}
void LLAppViewer::removeMarkerFile(bool leave_logout_marker)
{
- llinfos << "removeMarkerFile()" << llendl;
+ LL_DEBUGS("MarkerFile") << "removeMarkerFile()" << LL_ENDL;
if (mMarkerFile != NULL)
{
ll_apr_file_remove( mMarkerFileName );
@@ -2587,7 +2610,7 @@ bool LLAppViewer::initCache()
if (!gDirUtilp->setCacheDir(gSavedSettings.getString("CacheLocation")))
{
- llwarns << "Unable to set cache location" << llendl;
+ LL_WARNS("AppCache") << "Unable to set cache location" << LL_ENDL;
gSavedSettings.setString("CacheLocation", "");
}
@@ -2624,7 +2647,7 @@ bool LLAppViewer::initCache()
{
gSavedSettings.setU32("VFSOldSize", vfs_size_u32/MB);
}
- llinfos << "VFS CACHE SIZE: " << vfs_size/(1024*1024) << " MB" << llendl;
+ LL_INFOS("AppCache") << "VFS CACHE SIZE: " << vfs_size/(1024*1024) << " MB" << LL_ENDL;
// This has to happen BEFORE starting the vfs
//time_t ltime;
@@ -2688,8 +2711,7 @@ bool LLAppViewer::initCache()
{
sscanf(found_file.c_str() + start_pos, "%d", &old_salt);
}
- llinfos << "Default vfs data file not present, found " << old_vfs_data_file << llendl;
- llinfos << "Old salt: " << old_salt << llendl;
+ LL_DEBUGS("AppCache") << "Default vfs data file not present, found: " << old_vfs_data_file << " Old salt: " << old_salt << llendl;
}
}
@@ -2701,8 +2723,8 @@ bool LLAppViewer::initCache()
if (stat_result)
{
// We've got a bad/missing index file, nukem!
- llwarns << "Bad or missing vfx index file " << old_vfs_index_file << llendl;
- llwarns << "Removing old vfs data file " << old_vfs_data_file << llendl;
+ LL_WARNS("AppCache") << "Bad or missing vfx index file " << old_vfs_index_file << LL_ENDL;
+ LL_WARNS("AppCache") << "Removing old vfs data file " << old_vfs_data_file << LL_ENDL;
LLFile::remove(old_vfs_data_file);
LLFile::remove(old_vfs_index_file);
@@ -2739,7 +2761,7 @@ bool LLAppViewer::initCache()
if (resize_vfs)
{
- llinfos << "Removing old vfs and re-sizing" << llendl;
+ LL_DEBUGS("AppCache") << "Removing old vfs and re-sizing" << LL_ENDL;
LLFile::remove(old_vfs_data_file);
LLFile::remove(old_vfs_index_file);
@@ -2747,8 +2769,8 @@ bool LLAppViewer::initCache()
else if (old_salt != new_salt)
{
// move the vfs files to a new name before opening
- llinfos << "Renaming " << old_vfs_data_file << " to " << new_vfs_data_file << llendl;
- llinfos << "Renaming " << old_vfs_index_file << " to " << new_vfs_index_file << llendl;
+ LL_DEBUGS("AppCache") << "Renaming " << old_vfs_data_file << " to " << new_vfs_data_file << LL_ENDL;
+ LL_DEBUGS("AppCache") << "Renaming " << old_vfs_index_file << " to " << new_vfs_index_file << LL_ENDL;
LLFile::rename(old_vfs_data_file, new_vfs_data_file);
LLFile::rename(old_vfs_index_file, new_vfs_index_file);
}
@@ -2762,7 +2784,7 @@ bool LLAppViewer::initCache()
{
// Try again with fresh files
// (The constructor deletes corrupt files when it finds them.)
- llwarns << "VFS corrupt, deleted. Making new VFS." << llendl;
+ LL_WARNS("AppCache") << "VFS corrupt, deleted. Making new VFS." << LL_ENDL;
delete gVFS;
gVFS = new LLVFS(new_vfs_index_file, new_vfs_data_file, false, vfs_size_u32, false);
}
@@ -2783,9 +2805,8 @@ bool LLAppViewer::initCache()
void LLAppViewer::purgeCache()
{
- llinfos << "Purging Texture Cache..." << llendl;
+ LL_INFOS("AppCache") << "Purging Cache and Texture Cache..." << llendl;
LLAppViewer::getTextureCache()->purgeCache(LL_PATH_CACHE);
- llinfos << "Purging Cache..." << llendl;
std::string mask = gDirUtilp->getDirDelimiter() + "*.*";
gDirUtilp->deleteFilesInDir(gDirUtilp->getExpandedFilename(LL_PATH_CACHE,"").c_str(),mask);
}
@@ -2915,7 +2936,7 @@ void LLAppViewer::badNetworkHandler()
#if LL_WINDOWS
// Generates the minidump.
- LLWinDebug::handleException(NULL);
+ LLWinDebug::generateCrashStacks(NULL);
#endif
LLAppViewer::handleSyncViewerCrash();
LLAppViewer::handleViewerCrash();
@@ -3693,3 +3714,19 @@ void LLAppViewer::forceErrorSoftwareException()
// *FIX: Any way to insure it won't be handled?
throw;
}
+
+void LLAppViewer::startMainloopTimeout(F32 secs)
+{
+ if(secs < 0.0f)
+ {
+ secs = gSavedSettings.getF32("MainloopTimeoutDefault");
+ }
+
+ mMainloopTimeout->setTimeout(secs);
+ mMainloopTimeout->start();
+}
+
+void LLAppViewer::stopMainloopTimeout()
+{
+ mMainloopTimeout->stop();
+}
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index 56dd0efbdd..de127e5cf8 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -35,7 +35,7 @@
class LLTextureCache;
class LLWorkerThread;
class LLTextureFetch;
-
+class LLWatchdogTimeout;
class LLCommandLineParser;
class LLAppViewer : public LLApp
@@ -137,6 +137,11 @@ public:
std::string getSettingsFileName(const std::string& file);
+ // For thread debugging.
+ // llstartup needs to control this.
+ // llworld, send_agent_pause() also controls this.
+ void startMainloopTimeout(F32 secs = -1.0f);
+ void stopMainloopTimeout();
protected:
virtual bool initWindow(); // Initialize the viewer's window.
@@ -207,6 +212,8 @@ private:
bool mLogoutRequestSent; // Disconnect message sent to simulator, no longer safe to send messages to the sim.
S32 mYieldTime;
LLSD mSettingsFileList;
+
+ LLWatchdogTimeout* mMainloopTimeout;
};
// consts from viewer.h
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index 28314cb0ae..f21bdc4243 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -47,7 +47,7 @@
#include "llfloaterworldmap.h"
#include "llurldispatcher.h"
#include <Carbon/Carbon.h>
-
+#include "lldir.h"
namespace
{
// The command line args stored.
@@ -197,12 +197,13 @@ void LLAppViewerMacOSX::handleCrashReporting()
{
// Macintosh
LLString command_str;
- command_str = "open crashreporter.app";
+ command_str += "open crashreporter.app";
+
+ clear_signals();
+ llinfos << "Launching crash reporter using: '" << command_str << "'" << llendl;
system(command_str.c_str()); /* Flawfinder: ignore */
-
- // Sometimes signals don't seem to quit the viewer.
- // Make sure we exit so as to not totally confuse the user.
- exit(1);
+ llinfos << "returned from crash reporter... dying" << llendl;
+ _exit(1);
}
std::string LLAppViewerMacOSX::generateSerialNumber()
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index fed538da37..53cc1d3e17 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -79,7 +79,7 @@ LONG WINAPI viewer_windows_exception_handler(struct _EXCEPTION_POINTERS *excepti
// Generate a minidump if we can.
// Before we wake the error thread...
// Which will start the crash reporting.
- LLWinDebug::handleException(exception_infop);
+ LLWinDebug::generateCrashStacks(exception_infop);
// Flag status to error, so thread_error starts its work
LLApp::setError();
@@ -119,27 +119,11 @@ int APIENTRY WINMAIN(HINSTANCE hInstance,
LLAppViewerWin32* viewer_app_ptr = new LLAppViewerWin32(lpCmdLine);
- // *FIX:Mani This method is poorly named, since the exception
- // is now handled by LLApp.
- bool ok = LLWinDebug::setupExceptionHandler();
+ LLWinDebug::initExceptionHandler(viewer_windows_exception_handler);
- // Actually here's the exception setup.
- LPTOP_LEVEL_EXCEPTION_FILTER prev_filter;
- prev_filter = SetUnhandledExceptionFilter(viewer_windows_exception_handler);
- if (!prev_filter)
- {
- llwarns << "Our exception handler (" << (void *)LLWinDebug::handleException << ") replaced with NULL!" << llendl;
- ok = FALSE;
- }
- if (prev_filter != LLWinDebug::handleException)
- {
- llwarns << "Our exception handler (" << (void *)LLWinDebug::handleException << ") replaced with " << prev_filter << "!" << llendl;
- ok = FALSE;
- }
-
viewer_app_ptr->setErrorHandler(LLAppViewer::handleViewerCrash);
- ok = viewer_app_ptr->init();
+ bool ok = viewer_app_ptr->init();
if(!ok)
{
llwarns << "Application init failed." << llendl;
@@ -327,14 +311,14 @@ bool LLAppViewerWin32::initHardwareTest()
LLSplashScreen::update("Detecting hardware...");
- llinfos << "Attempting to poll DirectX for hardware info" << llendl;
+ LL_DEBUGS("AppInit") << "Attempting to poll DirectX for hardware info" << LL_ENDL;
gDXHardware.setWriteDebugFunc(write_debug_dx);
BOOL probe_ok = gDXHardware.getInfo(vram_only);
if (!probe_ok
&& gSavedSettings.getWarning("AboutDirectX9"))
{
- llinfos << "DirectX probe failed, alerting user." << llendl;
+ LL_WARNS("AppInit") << "DirectX probe failed, alerting user." << LL_ENDL;
// Warn them that runnin without DirectX 9 will
// not allow us to tell them about driver issues
@@ -355,13 +339,13 @@ bool LLAppViewerWin32::initHardwareTest()
OSMB_YESNO);
if (OSBTN_NO== button)
{
- llinfos << "User quitting after failed DirectX 9 detection" << llendl;
+ LL_INFOS("AppInit") << "User quitting after failed DirectX 9 detection" << LL_ENDL;
LLWeb::loadURLExternal(DIRECTX_9_URL);
return false;
}
gSavedSettings.setWarning("AboutDirectX9", FALSE);
}
- llinfos << "Done polling DirectX for hardware info" << llendl;
+ LL_DEBUGS("AppInit") << "Done polling DirectX for hardware info" << LL_ENDL;
// Only probe once after installation
gSavedSettings.setBOOL("ProbeHardwareOnStartup", FALSE);
@@ -373,13 +357,13 @@ bool LLAppViewerWin32::initHardwareTest()
LLSplashScreen::update(splash_msg.str().c_str());
}
- if (!LLWinDebug::setupExceptionHandler())
+ if (!LLWinDebug::checkExceptionHandler())
{
- llwarns << " Someone took over my exception handler (post hardware probe)!" << llendl;
+ LL_WARNS("AppInit") << " Someone took over my exception handler (post hardware probe)!" << LL_ENDL;
}
gGLManager.mVRAM = gDXHardware.getVRAM();
- llinfos << "Detected VRAM: " << gGLManager.mVRAM << llendl;
+ LL_INFOS("AppInit") << "Detected VRAM: " << gGLManager.mVRAM << LL_ENDL;
return true;
}
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 4aeb741b2c..b0dd0a99ac 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -418,7 +418,7 @@ void LLDrawable::makeStatic(BOOL warning_enabled)
if (mParent.notNull() && mParent->isActive() && warning_enabled)
{
- llwarns << "Drawable becamse static with active parent!" << llendl;
+ LL_WARNS_ONCE("Drawable") << "Drawable becomes static with active parent!" << LL_ENDL;
}
S32 child_count = mVObjp->mChildList.size();
diff --git a/indra/newview/llfeaturemanager.cpp b/indra/newview/llfeaturemanager.cpp
index 4d8dbbebac..17e8429616 100644
--- a/indra/newview/llfeaturemanager.cpp
+++ b/indra/newview/llfeaturemanager.cpp
@@ -95,7 +95,7 @@ void LLFeatureList::addFeature(const char *name, const BOOL available, const F32
{
if (mFeatures.count(name))
{
- llwarns << "LLFeatureList::Attempting to add preexisting feature " << name << llendl;
+ LL_WARNS("RenderInit") << "LLFeatureList::Attempting to add preexisting feature " << name << LL_ENDL;
}
LLFeatureInfo fi(name, available, level);
@@ -109,7 +109,7 @@ BOOL LLFeatureList::isFeatureAvailable(const char *name)
return mFeatures[name].mAvailable;
}
- llwarns << "Feature " << name << " not on feature list!" << llendl;
+ LL_WARNS("RenderInit") << "Feature " << name << " not on feature list!" << LL_ENDL;
// changing this to TRUE so you have to explicitly disable
// something for it to be disabled
@@ -123,7 +123,7 @@ F32 LLFeatureList::getRecommendedValue(const char *name)
return mFeatures[name].mRecommendedLevel;
}
- llwarns << "Feature " << name << " not on feature list or not available!" << llendl;
+ LL_WARNS("RenderInit") << "Feature " << name << " not on feature list or not available!" << LL_ENDL;
return 0;
}
@@ -146,46 +146,46 @@ BOOL LLFeatureList::maskList(LLFeatureList &mask)
//
if (!mFeatures.count(mask_fi.mName))
{
- llwarns << "Feature " << mask_fi.mName << " in mask not in top level!" << llendl;
+ LL_WARNS("RenderInit") << "Feature " << mask_fi.mName << " in mask not in top level!" << LL_ENDL;
continue;
}
LLFeatureInfo &cur_fi = mFeatures[mask_fi.mName];
if (mask_fi.mAvailable && !cur_fi.mAvailable)
{
- llwarns << "Mask attempting to reenabling disabled feature, ignoring " << cur_fi.mName << llendl;
+ LL_WARNS("RenderInit") << "Mask attempting to reenabling disabled feature, ignoring " << cur_fi.mName << LL_ENDL;
continue;
}
cur_fi.mAvailable = mask_fi.mAvailable;
cur_fi.mRecommendedLevel = llmin(cur_fi.mRecommendedLevel, mask_fi.mRecommendedLevel);
-#ifndef LL_RELEASE_FOR_DOWNLOAD
- llinfos << "Feature mask " << mask.mName
+ LL_DEBUGS("RenderInit") << "Feature mask " << mask.mName
<< " Feature " << mask_fi.mName
<< " Mask: " << mask_fi.mRecommendedLevel
- << " Now: " << cur_fi.mRecommendedLevel << llendl;
-#endif
+ << " Now: " << cur_fi.mRecommendedLevel << LL_ENDL;
}
-#if 0 && !LL_RELEASE_FOR_DOWNLOAD
- llinfos << "After applying mask " << mask.mName << llendl;
- dump();
-#endif
+ LL_DEBUGS("RenderInit") << "After applying mask " << mask.mName << std::endl;
+ // Will conditionally call dump only if the above message will be logged, thanks
+ // to it being wrapped by the LL_DEBUGS and LL_ENDL macros.
+ dump();
+ LL_CONT << LL_ENDL;
+
return TRUE;
}
void LLFeatureList::dump()
{
- llinfos << "Feature list: " << mName << llendl;
- llinfos << "--------------" << llendl;
+ LL_DEBUGS("RenderInit") << "Feature list: " << mName << LL_ENDL;
+ LL_DEBUGS("RenderInit") << "--------------" << LL_ENDL;
LLFeatureInfo fi;
feature_map_t::iterator feature_it;
for (feature_it = mFeatures.begin(); feature_it != mFeatures.end(); ++feature_it)
{
fi = feature_it->second;
- llinfos << fi.mName << "\t\t" << fi.mAvailable << ":" << fi.mRecommendedLevel << llendl;
+ LL_DEBUGS("RenderInit") << fi.mName << "\t\t" << fi.mAvailable << ":" << fi.mRecommendedLevel << LL_ENDL;
}
- llinfos << llendl;
+ LL_DEBUGS("RenderInit") << LL_ENDL;
}
LLFeatureList *LLFeatureManager::findMask(const char *name)
@@ -203,10 +203,10 @@ BOOL LLFeatureManager::maskFeatures(const char *name)
LLFeatureList *maskp = findMask(name);
if (!maskp)
{
-// llwarns << "Unknown feature mask " << name << llendl;
+ LL_DEBUGS("RenderInit") << "Unknown feature mask " << name << LL_ENDL;
return FALSE;
}
- llinfos << "Applying Feature Mask: " << name << llendl;
+ LL_DEBUGS("RenderInit") << "Applying Feature Mask: " << name << LL_ENDL;
return maskList(*maskp);
}
@@ -236,7 +236,7 @@ BOOL LLFeatureManager::loadFeatureTables()
if (!file)
{
- llwarns << "Unable to open feature table!" << llendl;
+ LL_WARNS("RenderInit") << "Unable to open feature table!" << LL_ENDL;
return FALSE;
}
@@ -245,7 +245,7 @@ BOOL LLFeatureManager::loadFeatureTables()
file >> version;
if (strcmp(name, "version"))
{
- llwarns << data_path << " does not appear to be a valid feature table!" << llendl;
+ LL_WARNS("RenderInit") << data_path << " does not appear to be a valid feature table!" << LL_ENDL;
return FALSE;
}
@@ -285,7 +285,7 @@ BOOL LLFeatureManager::loadFeatureTables()
file >> name;
if (mMaskList.count(name))
{
- llerrs << "Overriding mask " << name << ", this is invalid!" << llendl;
+ LL_ERRS("RenderInit") << "Overriding mask " << name << ", this is invalid!" << LL_ENDL;
}
flp = new LLFeatureList(name);
@@ -295,7 +295,7 @@ BOOL LLFeatureManager::loadFeatureTables()
{
if (!flp)
{
- llerrs << "Specified parameter before <list> keyword!" << llendl;
+ LL_ERRS("RenderInit") << "Specified parameter before <list> keyword!" << LL_ENDL;
}
S32 available;
F32 recommended;
@@ -327,7 +327,7 @@ void LLFeatureManager::loadGPUClass()
if (!file)
{
- llwarns << "Unable to open GPU table: " << data_path << "!" << llendl;
+ LL_WARNS("RenderInit") << "Unable to open GPU table: " << data_path << "!" << LL_ENDL;
return;
}
@@ -398,7 +398,7 @@ void LLFeatureManager::loadGPUClass()
{
// if we found it, stop!
file.close();
- llinfos << "GPU is " << label << llendl;
+ LL_INFOS("RenderInit") << "GPU is " << label << llendl;
mGPUString = label;
mGPUClass = (EGPUClass) strtol(cls.c_str(), NULL, 10);
mGPUSupported = (BOOL) strtol(supported.c_str(), NULL, 10);
@@ -408,7 +408,7 @@ void LLFeatureManager::loadGPUClass()
}
file.close();
- llwarns << "Couldn't match GPU to a class: " << gGLManager.getRawGLString() << llendl;
+ LL_WARNS("RenderInit") << "Couldn't match GPU to a class: " << gGLManager.getRawGLString() << LL_ENDL;
}
void LLFeatureManager::cleanupFeatureTables()
@@ -546,7 +546,7 @@ void LLFeatureManager::applyBaseMasks()
LLFeatureList* maskp = findMask("all");
if(maskp == NULL)
{
- llwarns << "AHH! No \"all\" in feature table!" << llendl;
+ LL_WARNS("RenderInit") << "AHH! No \"all\" in feature table!" << LL_ENDL;
return;
}
@@ -563,12 +563,12 @@ void LLFeatureManager::applyBaseMasks()
"Class3"
};
- llinfos << "Setting GPU Class to " << class_table[mGPUClass] << llendl;
+ LL_INFOS("RenderInit") << "Setting GPU Class to " << class_table[mGPUClass] << LL_ENDL;
maskFeatures(class_table[mGPUClass]);
}
else
{
- llinfos << "Setting GPU Class to Unknown" << llendl;
+ LL_INFOS("RenderInit") << "Setting GPU Class to Unknown" << LL_ENDL;
maskFeatures("Unknown");
}
diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h
index a13431d683..6a1b5d7758 100644
--- a/indra/newview/llpanellogin.h
+++ b/indra/newview/llpanellogin.h
@@ -68,6 +68,7 @@ class LLPanelLogin:
public LLPanel,
public LLWebBrowserCtrlObserver
{
+ LOG_CLASS(LLPanelLogin);
public:
LLPanelLogin(const LLRect &rect, BOOL show_server,
void (*callback)(S32 option, void* user_data),
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index b8774ceef7..d931e84638 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -265,8 +265,8 @@ namespace
const char* message, const LLSD& body,
LLHTTPClient::ResponderPtr response) const
{
- llwarns << " attemped to send " << message << " to " << host
- << " with null sender" << llendl;
+ LL_WARNS("AppInit") << " attemped to send " << message << " to " << host
+ << " with null sender" << LL_ENDL;
}
};
}
@@ -428,13 +428,13 @@ BOOL idle_startup()
if (ll_init_ares() == NULL)
{
- llerrs << "Could not start address resolution system" << llendl;
+ LL_ERRS("AppInit") << "Could not start address resolution system" << LL_ENDL;
}
//
// Initialize messaging system
//
- llinfos << "Initializing messaging system..." << llendl;
+ LL_DEBUGS("AppInit") << "Initializing messaging system..." << LL_ENDL;
std::string message_template_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"message_template.msg");
@@ -496,7 +496,7 @@ BOOL idle_startup()
if (gSavedSettings.getBOOL("LogMessages"))
{
- llinfos << "Message logging activated!" << llendl;
+ LL_DEBUGS("AppInit") << "Message logging activated!" << LL_ENDL;
msg->startLogging();
}
@@ -521,13 +521,13 @@ BOOL idle_startup()
F32 outBandwidth = gSavedSettings.getF32("OutBandwidth");
if (inBandwidth != 0.f)
{
- llinfos << "Setting packetring incoming bandwidth to " << inBandwidth << llendl;
+ LL_DEBUGS("AppInit") << "Setting packetring incoming bandwidth to " << inBandwidth << LL_ENDL;
msg->mPacketRing.setUseInThrottle(TRUE);
msg->mPacketRing.setInBandwidth(inBandwidth);
}
if (outBandwidth != 0.f)
{
- llinfos << "Setting packetring outgoing bandwidth to " << outBandwidth << llendl;
+ LL_DEBUGS("AppInit") << "Setting packetring outgoing bandwidth to " << outBandwidth << LL_ENDL;
msg->mPacketRing.setUseOutThrottle(TRUE);
msg->mPacketRing.setOutBandwidth(outBandwidth);
}
@@ -558,7 +558,7 @@ BOOL idle_startup()
BOOL init = gAudiop->init(kAUDIO_NUM_SOURCES, window_handle);
if(!init)
{
- llwarns << "Unable to initialize audio engine" << llendl;
+ LL_WARNS("AppInit") << "Unable to initialize audio engine" << LL_ENDL;
}
gAudiop->setMuted(TRUE);
}
@@ -566,7 +566,7 @@ BOOL idle_startup()
if (LLTimer::knownBadTimer())
{
- llwarns << "Unreliable timers detected (may be bad PCI chipset)!!" << llendl;
+ LL_WARNS("AppInit") << "Unreliable timers detected (may be bad PCI chipset)!!" << LL_ENDL;
}
//
@@ -639,7 +639,7 @@ BOOL idle_startup()
//---------------------------------------------------------------------
if (STATE_MEDIA_INIT == LLStartUp::getStartupState())
{
- llinfos << "Initializing Multimedia...." << llendl;
+ LL_DEBUGS("AppInit") << "Initializing Multimedia...." << LL_ENDL;
set_startup_status(0.03f, "Initializing Multimedia...", gAgent.mMOTD.c_str());
display_startup();
LLViewerMedia::initClass();
@@ -657,7 +657,7 @@ BOOL idle_startup()
if (STATE_LOGIN_SHOW == LLStartUp::getStartupState())
{
- llinfos << "Initializing Window" << llendl;
+ LL_DEBUGS("AppInit") << "Initializing Window" << LL_ENDL;
gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW);
// Push our window frontmost
@@ -668,11 +668,13 @@ BOOL idle_startup()
if (show_connect_box)
{
// Load all the name information out of the login view
- LLPanelLogin::getFields(firstname, lastname, password, remember_password);
+ // NOTE: Hits "Attempted getFields with no login view shown" warning, since we don't
+ // show the login view until login_show() is called below.
+ // LLPanelLogin::getFields(firstname, lastname, password, remember_password);
if (gNoRender)
{
- llerrs << "Need to autologin or use command line with norender!" << llendl;
+ LL_ERRS("AppInit") << "Need to autologin or use command line with norender!" << LL_ENDL;
}
// Make sure the process dialog doesn't hide things
gViewerWindow->setShowProgress(FALSE);
@@ -765,7 +767,7 @@ BOOL idle_startup()
}
gSavedSettings.setBOOL("RememberPassword", remember_password);
- llinfos << "Attempting login as: " << firstname << " " << lastname << llendl;
+ LL_INFOS("AppInit") << "Attempting login as: " << firstname << " " << lastname << LL_ENDL;
gDebugInfo["LoginName"] = firstname + " " + lastname;
}
@@ -911,7 +913,6 @@ BOOL idle_startup()
gDebugInfo["GridName"] = gGridInfo[gGridChoice].mLabel;
// *Note: this is where gUserAuth used to be created.
-
requested_options.clear();
requested_options.push_back("inventory-root");
requested_options.push_back("inventory-skeleton");
@@ -963,7 +964,7 @@ BOOL idle_startup()
if (STATE_LOGIN_AUTHENTICATE == LLStartUp::getStartupState())
{
- lldebugs << "STATE_LOGIN_AUTHENTICATE" << llendl;
+ LL_DEBUGS("AppInit") << "STATE_LOGIN_AUTHENTICATE" << LL_ENDL;
set_startup_status(progress, auth_desc.c_str(), auth_message.c_str());
progress += 0.02f;
display_startup();
@@ -1023,7 +1024,7 @@ BOOL idle_startup()
if(STATE_LOGIN_NO_DATA_YET == LLStartUp::getStartupState())
{
- //lldebugs << "STATE_LOGIN_NO_DATA_YET" << llendl;
+ LL_DEBUGS("AppInit") << "STATE_LOGIN_NO_DATA_YET" << LL_ENDL;
// If we get here we have gotten past the potential stall
// in curl, so take "may appear frozen" out of progress bar. JC
auth_desc = "Logging in...";
@@ -1037,7 +1038,7 @@ BOOL idle_startup()
LLUserAuth::UserAuthcode error = LLUserAuth::getInstance()->authResponse();
if(LLUserAuth::E_NO_RESPONSE_YET == error)
{
- //llinfos << "waiting..." << llendl;
+ LL_DEBUGS("AppInit") << "waiting..." << LL_ENDL;
return do_normal_idle;
}
LLStartUp::setStartupState( STATE_LOGIN_DOWNLOADING );
@@ -1048,7 +1049,7 @@ BOOL idle_startup()
if(STATE_LOGIN_DOWNLOADING == LLStartUp::getStartupState())
{
- lldebugs << "STATE_LOGIN_DOWNLOADING" << llendl;
+ LL_DEBUGS("AppInit") << "STATE_LOGIN_DOWNLOADING" << LL_ENDL;
// Process messages to keep from dropping circuit.
LLMessageSystem* msg = gMessageSystem;
while (msg->checkAllMessages(gFrameCount, gServicePump))
@@ -1058,7 +1059,7 @@ BOOL idle_startup()
LLUserAuth::UserAuthcode error = LLUserAuth::getInstance()->authResponse();
if(LLUserAuth::E_DOWNLOADING == error)
{
- //llinfos << "downloading..." << llendl;
+ LL_DEBUGS("AppInit") << "downloading..." << LL_ENDL;
return do_normal_idle;
}
LLStartUp::setStartupState( STATE_LOGIN_PROCESS_RESPONSE );
@@ -1069,7 +1070,7 @@ BOOL idle_startup()
if(STATE_LOGIN_PROCESS_RESPONSE == LLStartUp::getStartupState())
{
- lldebugs << "STATE_LOGIN_PROCESS_RESPONSE" << llendl;
+ LL_DEBUGS("AppInit") << "STATE_LOGIN_PROCESS_RESPONSE" << LL_ENDL;
std::ostringstream emsg;
BOOL quit = FALSE;
const char* login_response = NULL;
@@ -1091,7 +1092,7 @@ BOOL idle_startup()
}
else if(login_response && (0 == strcmp(login_response, "indeterminate")))
{
- llinfos << "Indeterminate login..." << llendl;
+ LL_INFOS("AppInit") << "Indeterminate login..." << LL_ENDL;
sAuthUris = LLSRV::rewriteURI(LLUserAuth::getInstance()->getResponse("next_url"));
sAuthUriNum = 0;
auth_method = LLUserAuth::getInstance()->getResponse("next_method");
@@ -1138,7 +1139,7 @@ BOOL idle_startup()
{
if (show_connect_box)
{
- llinfos << "Need tos agreement" << llendl;
+ LL_DEBUGS("AppInit") << "Need tos agreement" << LL_ENDL;
LLStartUp::setStartupState( STATE_UPDATE_CHECK );
LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_TOS,
message_response);
@@ -1155,7 +1156,7 @@ BOOL idle_startup()
{
if (show_connect_box)
{
- llinfos << "Need critical message" << llendl;
+ LL_DEBUGS("AppInit") << "Need critical message" << LL_ENDL;
LLStartUp::setStartupState( STATE_UPDATE_CHECK );
LLFloaterTOS* tos_dialog = LLFloaterTOS::show(LLFloaterTOS::TOS_CRITICAL_MESSAGE,
message_response);
@@ -1190,7 +1191,7 @@ BOOL idle_startup()
}
if(reason_response && (0 == strcmp(reason_response, "optional")))
{
- llinfos << "Login got optional update" << llendl;
+ LL_DEBUGS("AppInit") << "Login got optional update" << LL_ENDL;
auth_message = LLUserAuth::getInstance()->getResponse("message");
if (show_connect_box)
{
@@ -1453,8 +1454,8 @@ BOOL idle_startup()
{
if (gNoRender)
{
- llinfos << "Bad login - missing return values" << llendl;
- llinfos << emsg << llendl;
+ LL_WARNS("AppInit") << "Bad login - missing return values" << LL_ENDL;
+ LL_WARNS("AppInit") << emsg << LL_ENDL;
exit(0);
}
// Bounce back to the login screen.
@@ -1473,8 +1474,8 @@ BOOL idle_startup()
{
if (gNoRender)
{
- llinfos << "Failed to login!" << llendl;
- llinfos << emsg << llendl;
+ LL_WARNS("AppInit") << "Failed to login!" << LL_ENDL;
+ LL_WARNS("AppInit") << emsg << LL_ENDL;
exit(0);
}
// Bounce back to the login screen.
@@ -1543,11 +1544,11 @@ BOOL idle_startup()
LLWorld::getInstance()->addRegion(first_sim_handle, first_sim);
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(first_sim_handle);
- llinfos << "Adding initial simulator " << regionp->getOriginGlobal() << llendl;
+ LL_INFOS("AppInit") << "Adding initial simulator " << regionp->getOriginGlobal() << LL_ENDL;
LLStartUp::setStartupState( STATE_SEED_GRANTED_WAIT );
regionp->setSeedCapability(first_sim_seed_cap);
- llinfos << "Waiting for seed grant ...." << llendl;
+ LL_DEBUGS("AppInit") << "Waiting for seed grant ...." << LL_ENDL;
// Set agent's initial region to be the one we just created.
gAgent.setRegion(regionp);
@@ -1615,7 +1616,7 @@ BOOL idle_startup()
//
// Set message handlers
//
- llinfos << "Initializing communications..." << llendl;
+ LL_INFOS("AppInit") << "Initializing communications..." << LL_ENDL;
// register callbacks for messages. . . do this after initial handshake to make sure that we don't catch any unwanted
register_viewer_callbacks(gMessageSystem);
@@ -1664,7 +1665,7 @@ BOOL idle_startup()
// Sets up the parameters for the first simulator
- llinfos << "Initializing camera..." << llendl;
+ LL_DEBUGS("AppInit") << "Initializing camera..." << LL_ENDL;
gFrameTime = totalTime();
F32 last_time = gFrameTimeSeconds;
gFrameTimeSeconds = (S64)(gFrameTime - gStartTime)/SEC_TO_MICROSEC;
@@ -1699,12 +1700,12 @@ BOOL idle_startup()
// Initialize global class data needed for surfaces (i.e. textures)
if (!gNoRender)
{
- llinfos << "Initializing sky..." << llendl;
+ LL_DEBUGS("AppInit") << "Initializing sky..." << LL_ENDL;
// Initialize all of the viewer object classes for the first time (doing things like texture fetches.
gSky.init(initial_sun_direction);
}
- llinfos << "Decoding images..." << llendl;
+ LL_DEBUGS("AppInit") << "Decoding images..." << LL_ENDL;
// For all images pre-loaded into viewer cache, decode them.
// Need to do this AFTER we init the sky
const S32 DECODE_TIME_SEC = 2;
@@ -1722,14 +1723,14 @@ BOOL idle_startup()
LLMessageSystem* msg = gMessageSystem;
if (!msg->mOurCircuitCode)
{
- llwarns << "Attempting to connect to simulator with a zero circuit code!" << llendl;
+ LL_WARNS("AppInit") << "Attempting to connect to simulator with a zero circuit code!" << LL_ENDL;
}
gUseCircuitCallbackCalled = FALSE;
msg->enableCircuit(first_sim, TRUE);
// now, use the circuit info to tell simulator about us!
- llinfos << "viewer: UserLoginLocationReply() Enabling " << first_sim << " with code " << msg->mOurCircuitCode << llendl;
+ LL_INFOS("AppInit") << "viewer: UserLoginLocationReply() Enabling " << first_sim << " with code " << msg->mOurCircuitCode << LL_ENDL;
msg->newMessageFast(_PREHASH_UseCircuitCode);
msg->nextBlockFast(_PREHASH_CircuitCode);
msg->addU32Fast(_PREHASH_Code, msg->mOurCircuitCode);
@@ -1755,7 +1756,7 @@ BOOL idle_startup()
//---------------------------------------------------------------------
if(STATE_WORLD_WAIT == LLStartUp::getStartupState())
{
- //llinfos << "Waiting for simulator ack...." << llendl;
+ LL_DEBUGS("AppInit") << "Waiting for simulator ack...." << LL_ENDL;
set_startup_status(0.59f, LLTrans::getString("LoginWaitingForRegionHandshake").c_str(), gAgent.mMOTD.c_str());
if(gGotUseCircuitCodeAck)
{
@@ -1774,7 +1775,7 @@ BOOL idle_startup()
//---------------------------------------------------------------------
if (STATE_AGENT_SEND == LLStartUp::getStartupState())
{
- llinfos << "Connecting to region..." << llendl;
+ LL_DEBUGS("AppInit") << "Connecting to region..." << LL_ENDL;
set_startup_status(0.60f, LLTrans::getString("LoginConnectingToRegion").c_str(), gAgent.mMOTD.c_str());
// register with the message system so it knows we're
// expecting this message
@@ -1826,8 +1827,8 @@ BOOL idle_startup()
}
else
{
- //llinfos << "Awaiting AvatarInitComplete, got "
- //<< msg->getMessageName() << llendl;
+ LL_DEBUGS("AppInit") << "Awaiting AvatarInitComplete, got "
+ << msg->getMessageName() << LL_ENDL;
}
}
msg->processAcks();
@@ -1879,7 +1880,7 @@ BOOL idle_startup()
{
if(!gInventory.loadSkeleton(options, gInventoryLibraryOwner))
{
- llwarns << "Problem loading inventory-skel-lib" << llendl;
+ LL_WARNS("AppInit") << "Problem loading inventory-skel-lib" << LL_ENDL;
}
}
options.clear();
@@ -1887,8 +1888,7 @@ BOOL idle_startup()
{
if(!gInventory.loadSkeleton(options, gAgent.getID()))
{
- llwarns << "Problem loading inventory-skel-targets"
- << llendl;
+ LL_WARNS("AppInit") << "Problem loading inventory-skel-targets" << LL_ENDL;
}
}
@@ -2040,17 +2040,17 @@ BOOL idle_startup()
if (rate_bps > FASTER_RATE_BPS
&& rate_bps > max_bandwidth)
{
- llinfos << "Fast network connection, increasing max bandwidth to "
+ LL_DEBUGS("AppInit") << "Fast network connection, increasing max bandwidth to "
<< FASTER_RATE_BPS/1024.f
- << " kbps" << llendl;
+ << " kbps" << LL_ENDL;
gViewerThrottle.setMaxBandwidth(FASTER_RATE_BPS / 1024.f);
}
else if (rate_bps > FAST_RATE_BPS
&& rate_bps > max_bandwidth)
{
- llinfos << "Fast network connection, increasing max bandwidth to "
+ LL_DEBUGS("AppInit") << "Fast network connection, increasing max bandwidth to "
<< FAST_RATE_BPS/1024.f
- << " kbps" << llendl;
+ << " kbps" << LL_ENDL;
gViewerThrottle.setMaxBandwidth(FAST_RATE_BPS / 1024.f);
}
}
@@ -2082,8 +2082,8 @@ BOOL idle_startup()
LLUserAuth::options_t gesture_options;
if (LLUserAuth::getInstance()->getOptions("gestures", gesture_options))
{
- llinfos << "Gesture Manager loading " << gesture_options.size()
- << llendl;
+ LL_DEBUGS("AppInit") << "Gesture Manager loading " << gesture_options.size()
+ << LL_ENDL;
std::vector<LLUUID> item_ids;
LLUserAuth::options_t::iterator resp_it;
for (resp_it = gesture_options.begin();
@@ -2136,7 +2136,7 @@ BOOL idle_startup()
msg->setHandlerFuncFast(_PREHASH_AttachedSound, process_attached_sound);
msg->setHandlerFuncFast(_PREHASH_AttachedSoundGainChange, process_attached_sound_gain_change);
- llinfos << "Initialization complete" << llendl;
+ LL_DEBUGS("AppInit") << "Initialization complete" << LL_ENDL;
gRenderStartTime.reset();
gForegroundTime.reset();
@@ -2273,7 +2273,7 @@ BOOL idle_startup()
gViewerWindow->showCursor();
gViewerWindow->getWindow()->resetBusyCount();
gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW);
- //llinfos << "Done releasing bitmap" << llendl;
+ LL_DEBUGS("AppInit") << "Done releasing bitmap" << LL_ENDL;
gViewerWindow->setShowProgress(FALSE);
gViewerWindow->setProgressCancelButtonVisible(FALSE, "");
@@ -2295,7 +2295,7 @@ BOOL idle_startup()
if (gSavedSettings.getBOOL("StatsAutoRun"))
{
LLUUID id;
- llinfos << "Starting automatic playback" << llendl;
+ LL_DEBUGS("AppInit") << "Starting automatic playback" << LL_ENDL;
gAgentPilot.startPlayback();
}
@@ -2311,9 +2311,9 @@ BOOL idle_startup()
// Unmute audio if desired and setup volumes.
// This is a not-uncommon crash site, so surround it with
// llinfos output to aid diagnosis.
- llinfos << "Doing first audio_update_volume..." << llendl;
+ LL_INFOS("AppInit") << "Doing first audio_update_volume..." << LL_ENDL;
audio_update_volume();
- llinfos << "Done first audio_update_volume." << llendl;
+ LL_INFOS("AppInit") << "Done first audio_update_volume." << LL_ENDL;
// reset keyboard focus to sane state of pointing at world
gFocusMgr.setKeyboardFocus(NULL);
@@ -2322,10 +2322,12 @@ BOOL idle_startup()
gDebugView->mFastTimerView->setVisible(TRUE);
#endif
+ LLAppViewer::instance()->startMainloopTimeout();
+
return do_normal_idle;
}
- llwarns << "Reached end of idle_startup for state " << LLStartUp::getStartupState() << llendl;
+ LL_WARNS("AppInit") << "Reached end of idle_startup for state " << LLStartUp::getStartupState() << LL_ENDL;
return do_normal_idle;
}
@@ -2335,7 +2337,7 @@ BOOL idle_startup()
void login_show()
{
- llinfos << "Initializing Login Screen" << llendl;
+ LL_INFOS("AppInit") << "Initializing Login Screen" << LL_ENDL;
#ifdef LL_RELEASE_FOR_DOWNLOAD
BOOL bUseDebugLogin = gSavedSettings.getBOOL("UseDebugLogin");
@@ -2349,7 +2351,7 @@ void login_show()
// UI textures have been previously loaded in doPreloadImages()
- llinfos << "Setting Servers" << llendl;
+ LL_DEBUGS("AppInit") << "Setting Servers" << LL_ENDL;
if( GRID_INFO_OTHER == gGridChoice )
{
@@ -2418,7 +2420,7 @@ void login_callback(S32 option, void *userdata)
}
else
{
- llwarns << "Unknown login button clicked" << llendl;
+ LL_WARNS("AppInit") << "Unknown login button clicked" << LL_ENDL;
}
}
@@ -2503,7 +2505,7 @@ void save_password_to_disk(const char* hashed_password)
if (fwrite(buffer, HASHED_LENGTH, 1, fp) != 1)
{
- llwarns << "Short write" << llendl;
+ LL_WARNS("AppInit") << "Short write" << LL_ENDL;
}
fclose(fp);
@@ -2553,7 +2555,7 @@ void first_run_dialog_callback(S32 option, void* userdata)
{
if (0 == option)
{
- llinfos << "First run dialog cancelling" << llendl;
+ LL_DEBUGS("AppInit") << "First run dialog cancelling" << LL_ENDL;
LLWeb::loadURL( CREATE_ACCOUNT_URL );
}
@@ -2586,7 +2588,7 @@ void login_alert_status(S32 option, void* user_data)
LLStartUp::setStartupState( STATE_LOGIN_CLEANUP );
break;
default:
- llwarns << "Missing case in login_alert_status switch" << llendl;
+ LL_WARNS("AppInit") << "Missing case in login_alert_status switch" << LL_ENDL;
}
LLPanelLogin::giveFocus();
@@ -2704,7 +2706,7 @@ void update_dialog_callback(S32 option, void *userdata)
if (update_exe_path.empty())
{
// We're hosed, bail
- llwarns << "LLDir::getTempFilename() failed" << llendl;
+ LL_WARNS("AppInit") << "LLDir::getTempFilename() failed" << LL_ENDL;
LLAppViewer::instance()->forceQuit();
return;
}
@@ -2715,14 +2717,14 @@ void update_dialog_callback(S32 option, void *userdata)
updater_source += gDirUtilp->getDirDelimiter();
updater_source += "updater.exe";
- llinfos << "Calling CopyFile source: " << updater_source.c_str()
+ LL_DEBUGS("AppInit") << "Calling CopyFile source: " << updater_source.c_str()
<< " dest: " << update_exe_path
- << llendl;
+ << LL_ENDL;
if (!CopyFileA(updater_source.c_str(), update_exe_path.c_str(), FALSE))
{
- llinfos << "Unable to copy the updater!" << llendl;
+ LL_WARNS("AppInit") << "Unable to copy the updater!" << LL_ENDL;
LLAppViewer::instance()->forceQuit();
return;
}
@@ -2760,14 +2762,14 @@ void update_dialog_callback(S32 option, void *userdata)
params << " -program \"" << program_name << "\"";
}
- llinfos << "Calling updater: " << update_exe_path << " " << params.str() << llendl;
+ LL_DEBUGS("AppInit") << "Calling updater: " << update_exe_path << " " << params.str() << LL_ENDL;
//Explicitly remove the marker file, otherwise we pass the lock onto the child process and things get weird.
LLAppViewer::instance()->removeMarkerFile(); // In case updater fails
// Use spawn() to run asynchronously
int retval = _spawnl(_P_NOWAIT, update_exe_path.c_str(), update_exe_path.c_str(), params.str().c_str(), NULL);
- llinfos << "Spawn returned " << retval << llendl;
+ LL_DEBUGS("AppInit") << "Spawn returned " << retval << LL_ENDL;
#elif LL_DARWIN
// if a sim name was passed in via command line parameter (typically through a SLURL)
@@ -2785,7 +2787,7 @@ void update_dialog_callback(S32 option, void *userdata)
update_exe_path += LLAppViewer::instance()->getSecondLifeTitle();
update_exe_path += "\" &";
- llinfos << "Calling updater: " << update_exe_path << llendl;
+ LL_DEBUGS("AppInit") << "Calling updater: " << update_exe_path << LL_ENDL;
// *REMOVE:Mani The following call is handled through ~LLAppViewer.
// remove_marker_file(); // In case updater fails
@@ -2815,7 +2817,7 @@ void use_circuit_callback(void**, S32 result)
if (result)
{
// Make sure user knows something bad happened. JC
- llinfos << "Backing up to login screen!" << llendl;
+ LL_WARNS("AppInit") << "Backing up to login screen!" << LL_ENDL;
gViewerWindow->alertXml("LoginPacketNeverReceived",
login_alert_status, NULL);
reset_login();
@@ -3662,10 +3664,10 @@ void init_start_screen(S32 location_id)
if (gStartImageGL.notNull())
{
gStartImageGL = NULL;
- llinfos << "re-initializing start screen" << llendl;
+ LL_INFOS("AppInit") << "re-initializing start screen" << LL_ENDL;
}
- llinfos << "Loading startup bitmap..." << llendl;
+ LL_DEBUGS("AppInit") << "Loading startup bitmap..." << LL_ENDL;
LLString temp_str = gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter();
@@ -3684,12 +3686,12 @@ void init_start_screen(S32 location_id)
// driver bug
if(!gSavedSettings.getBOOL("UseStartScreen"))
{
- llinfos << "Bitmap load disabled" << llendl;
+ LL_INFOS("AppInit") << "Bitmap load disabled" << LL_ENDL;
return;
}
else if(!start_image_bmp->load(temp_str) )
{
- llinfos << "Bitmap load failed" << llendl;
+ LL_WARNS("AppInit") << "Bitmap load failed" << LL_ENDL;
return;
}
@@ -3700,7 +3702,7 @@ void init_start_screen(S32 location_id)
LLPointer<LLImageRaw> raw = new LLImageRaw;
if (!start_image_bmp->decode(raw, 0.0f))
{
- llinfos << "Bitmap decode failed" << llendl;
+ LL_WARNS("AppInit") << "Bitmap decode failed" << LL_ENDL;
gStartImageGL = NULL;
return;
}
@@ -3713,7 +3715,7 @@ void init_start_screen(S32 location_id)
// frees the bitmap
void release_start_screen()
{
- //llinfos << "Releasing bitmap..." << llendl;
+ LL_DEBUGS("AppInit") << "Releasing bitmap..." << LL_ENDL;
gStartImageGL = NULL;
}
@@ -3721,7 +3723,7 @@ void release_start_screen()
// static
void LLStartUp::setStartupState( S32 state )
{
- llinfos << "Startup state changing from " << gStartupState << " to " << state << llendl;
+ LL_INFOS("AppInit") << "Startup state changing from " << gStartupState << " to " << state << LL_ENDL;
gStartupState = state;
}
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index 6aba05a788..534d19874c 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -1023,8 +1023,8 @@ S64 LLTextureCache::initCache(ELLPath location, S64 max_size, BOOL read_only)
sCacheMaxTexturesSize = max_size;
max_size -= sCacheMaxTexturesSize;
- llinfos << "TEXTURE CACHE: Headers: " << sCacheMaxEntries
- << " Textures size: " << sCacheMaxTexturesSize/(1024*1024) << " MB" << llendl;
+ LL_INFOS("TextureCache") << "Headers: " << sCacheMaxEntries
+ << " Textures size: " << sCacheMaxTexturesSize/(1024*1024) << " MB" << LL_ENDL;
setDirNames(location);
@@ -1161,7 +1161,7 @@ void LLTextureCache::purgeTextures(bool validate)
S32 num_entries = filesize / sizeof(Entry);
if (num_entries * (S32)sizeof(Entry) != filesize)
{
- llwarns << "Bad cache file: " << mTexturesDirEntriesFileName << " Purging." << llendl;
+ LL_WARNS("TextureCache") << "Bad cache file: " << mTexturesDirEntriesFileName << " Purging." << LL_ENDL;
purgeAllTextures(false);
return;
}
@@ -1175,19 +1175,19 @@ void LLTextureCache::purgeTextures(bool validate)
(U8*)entries, 0, num_entries*sizeof(Entry));
if (bytes_read != filesize)
{
- llwarns << "Bad cache file (2): " << mTexturesDirEntriesFileName << " Purging." << llendl;
+ LL_WARNS("TextureCache") << "Bad cache file (2): " << mTexturesDirEntriesFileName << " Purging." << LL_ENDL;
purgeAllTextures(false);
return;
}
- llinfos << "TEXTURE CACHE: Reading Entries..." << llendl;
+ LL_DEBUGS("TextureCache") << "TEXTURE CACHE: Reading Entries..." << LL_ENDL;
std::map<LLUUID, S32> entry_idx_map;
S64 total_size = 0;
for (S32 idx=0; idx<num_entries; idx++)
{
const LLUUID& id = entries[idx].mID;
-// llinfos << "Entry: " << id << " Size: " << entries[i].mSize << " Time: " << entries[i].mTime << llendl;
+ LL_DEBUGS("TextureCache") << "Entry: " << id << " Size: " << entries[idx].mSize << " Time: " << entries[idx].mTime << LL_ENDL;
std::map<LLUUID, S32>::iterator iter = entry_idx_map.find(id);
if (iter != entry_idx_map.end())
{
@@ -1206,7 +1206,7 @@ void LLTextureCache::purgeTextures(bool validate)
validate_idx = gSavedSettings.getU32("CacheValidateCounter");
U32 next_idx = (++validate_idx) % 256;
gSavedSettings.setU32("CacheValidateCounter", next_idx);
- llinfos << "TEXTURE CACHE: Validating: " << validate_idx << llendl;
+ LL_DEBUGS("TextureCache") << "TEXTURE CACHE: Validating: " << validate_idx << LL_ENDL;
}
S64 min_cache_size = (sCacheMaxTexturesSize * 9) / 10;
@@ -1230,12 +1230,12 @@ void LLTextureCache::purgeTextures(bool validate)
S32 uuididx = entries[idx].mID.mData[0];
if (uuididx == validate_idx)
{
-// llinfos << "Validating: " << filename << "Size: " << entries[idx].mSize << llendl;
+ LL_DEBUGS("TextureCache") << "Validating: " << filename << "Size: " << entries[idx].mSize << LL_ENDL;
S32 bodysize = ll_apr_file_size(filename, NULL);
if (bodysize != entries[idx].mSize)
{
- llwarns << "TEXTURE CACHE BODY HAS BAD SIZE: " << bodysize << " != " << entries[idx].mSize
- << filename << llendl;
+ LL_WARNS("TextureCache") << "TEXTURE CACHE BODY HAS BAD SIZE: " << bodysize << " != " << entries[idx].mSize
+ << filename << LL_ENDL;
purge_entry = true;
}
}
@@ -1243,7 +1243,7 @@ void LLTextureCache::purgeTextures(bool validate)
if (purge_entry)
{
purge_count++;
-// llinfos << "PURGING: " << filename << llendl;
+ LL_DEBUGS("TextureCache") << "PURGING: " << filename << LL_ENDL;
ll_apr_file_remove(filename, NULL);
total_size -= entries[idx].mSize;
entries[idx].mSize = 0;
@@ -1259,7 +1259,7 @@ void LLTextureCache::purgeTextures(bool validate)
}
num_entries = next_idx;
- llinfos << "TEXTURE CACHE: Writing Entries: " << num_entries << llendl;
+ LL_DEBUGS("TextureCache") << "TEXTURE CACHE: Writing Entries: " << num_entries << LL_ENDL;
ll_apr_file_remove(mTexturesDirEntriesFileName, NULL);
ll_apr_file_write_ex(mTexturesDirEntriesFileName, NULL,
@@ -1276,7 +1276,7 @@ void LLTextureCache::purgeTextures(bool validate)
delete[] entries;
- llinfos << "TEXTURE CACHE:"
+ LL_INFOS("TextureCache") << "TEXTURE CACHE:"
<< " PURGED: " << purge_count
<< " ENTRIES: " << num_entries
<< " CACHE SIZE: " << total_size / 1024*1024 << " MB"
diff --git a/indra/newview/llviewerjointmesh.cpp b/indra/newview/llviewerjointmesh.cpp
index ce23efe2f0..19035e8fc8 100644
--- a/indra/newview/llviewerjointmesh.cpp
+++ b/indra/newview/llviewerjointmesh.cpp
@@ -870,9 +870,9 @@ void LLViewerJointMesh::updateVectorize()
case 1: vp = "SSE"; break;
default: vp = "COMPILER DEFAULT"; break;
}
- llinfos << "Vectorization : " << ( vectorizeEnable ? "ENABLED" : "DISABLED" ) << llendl ;
- llinfos << "Vector Processor : " << vp << llendl ;
- llinfos << "Vectorized Skinning : " << ( vectorizeSkin ? "ENABLED" : "DISABLED" ) << llendl ;
+ LL_INFOS("AppInit") << "Vectorization : " << ( vectorizeEnable ? "ENABLED" : "DISABLED" ) << LL_ENDL ;
+ LL_INFOS("AppInit") << "Vector Processor : " << vp << LL_ENDL ;
+ LL_INFOS("AppInit") << "Vectorized Skinning : " << ( vectorizeSkin ? "ENABLED" : "DISABLED" ) << LL_ENDL ;
if(vectorizeEnable && vectorizeSkin)
{
switch(sVectorizeProcessor)
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index f7b9d2dc93..fd2a906edd 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -1096,7 +1096,9 @@ void init_client_menu(LLMenuGL* menu)
{
LLMenuGL* sub = NULL;
sub = new LLMenuGL("Debugging");
+#if LL_WINDOWS
sub->append(new LLMenuItemCallGL("Force Breakpoint", &force_error_breakpoint, NULL, NULL, 'B', MASK_CONTROL | MASK_ALT));
+#endif
sub->append(new LLMenuItemCallGL("Force LLError And Crash", &force_error_llerror));
sub->append(new LLMenuItemCallGL("Force Bad Memory Access", &force_error_bad_memory_access));
sub->append(new LLMenuItemCallGL("Force Infinite Loop", &force_error_infinite_loop));
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 3b2b82e1f9..391a5ad5cb 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -202,7 +202,7 @@ void give_money(const LLUUID& uuid, LLViewerRegion* region, S32 amount, BOOL is_
{
if(0 == amount) return;
amount = abs(amount);
- llinfos << "give_money(" << uuid << "," << amount << ")"<< llendl;
+ LL_INFOS("Messaging") << "give_money(" << uuid << "," << amount << ")"<< LL_ENDL;
if(can_afford_transaction(amount))
{
// gStatusBar->debitBalance(amount);
@@ -242,7 +242,7 @@ void send_complete_agent_movement(const LLHost& sim_host)
void process_logout_reply(LLMessageSystem* msg, void**)
{
// The server has told us it's ok to quit.
- llinfos << "process_logout_reply" << llendl;
+ LL_DEBUGS("Messaging") << "process_logout_reply" << LL_ENDL;
LLUUID agent_id;
msg->getUUID("AgentData", "AgentID", agent_id);
@@ -250,7 +250,7 @@ void process_logout_reply(LLMessageSystem* msg, void**)
msg->getUUID("AgentData", "SessionID", session_id);
if((agent_id != gAgent.getID()) || (session_id != gAgent.getSessionID()))
{
- llwarns << "Bogus Logout Reply" << llendl;
+ LL_WARNS("Messaging") << "Bogus Logout Reply" << LL_ENDL;
}
LLInventoryModel::update_map_t parents;
@@ -268,7 +268,7 @@ void process_logout_reply(LLMessageSystem* msg, void**)
// We do not need to track the asset ids, just account for an
// updated inventory version.
- llinfos << "process_logout_reply itemID=" << item_id << llendl;
+ LL_INFOS("Messaging") << "process_logout_reply itemID=" << item_id << LL_ENDL;
LLInventoryItem* item = gInventory.getItem( item_id );
if( item )
{
@@ -277,7 +277,7 @@ void process_logout_reply(LLMessageSystem* msg, void**)
}
else
{
- llinfos << "process_logout_reply item not found: " << item_id << llendl;
+ LL_INFOS("Messaging") << "process_logout_reply item not found: " << item_id << LL_ENDL;
}
}
LLAppViewer::instance()->forceQuit();
@@ -300,15 +300,15 @@ void process_layer_data(LLMessageSystem *mesgsys, void **user_data)
size = mesgsys->getSizeFast(_PREHASH_LayerData, _PREHASH_Data);
if (0 == size)
{
- llwarns << "Layer data has zero size." << llendl;
+ LL_WARNS("Messaging") << "Layer data has zero size." << LL_ENDL;
return;
}
if (size < 0)
{
// getSizeFast() is probably trying to tell us about an error
- llwarns << "getSizeFast() returned negative result: "
+ LL_WARNS("Messaging") << "getSizeFast() returned negative result: "
<< size
- << llendl;
+ << LL_ENDL;
return;
}
U8 *datap = new U8[size];
@@ -353,7 +353,7 @@ void export_complete()
size_t nread = fread(buffer, 1, length, fXML);
if (nread < (size_t) length)
{
- llwarns << "Short read" << llendl;
+ LL_WARNS("Messaging") << "Short read" << LL_ENDL;
}
buffer[nread] = '\0';
fclose(fXML);
@@ -375,12 +375,12 @@ void export_complete()
LLUUID image_uuid(image_uuid_str);
- llinfos << "Found UUID: " << image_uuid << llendl;
+ LL_INFOS("Messaging") << "Found UUID: " << image_uuid << LL_ENDL;
std::map<LLUUID, LLString>::iterator itor = gImageChecksums.find(image_uuid);
if (itor != gImageChecksums.end())
{
- llinfos << "Replacing with checksum: " << itor->second << llendl;
+ LL_INFOS("Messaging") << "Replacing with checksum: " << itor->second << LL_ENDL;
if (itor->second.c_str() != NULL)
{
memcpy(&pos_check[10], itor->second.c_str(), 32); /* Flawfinder: ignore */
@@ -393,7 +393,7 @@ void export_complete()
LLFILE* fXMLOut = LLFile::fopen(gExportedFile.c_str(), "wb"); /* Flawfinder: ignore */
if (fwrite(buffer, 1, length, fXMLOut) != length)
{
- llwarns << "Short write" << llendl;
+ LL_WARNS("Messaging") << "Short write" << LL_ENDL;
}
fclose(fXMLOut);
@@ -407,14 +407,14 @@ void exported_item_complete(const LLTSCode status, void *user_data)
if (status < LLTS_OK)
{
- llinfos << "Export failed!" << llendl;
+ LL_WARNS("Messaging") << "Export failed!" << LL_ENDL;
}
else
{
++current_object_count;
if (current_image_count == exported_image_count && current_object_count == exported_object_count)
{
- llinfos << "*** Export complete ***" << llendl;
+ LL_INFOS("Messaging") << "*** Export complete ***" << LL_ENDL;
export_complete();
}
@@ -442,7 +442,7 @@ void exported_j2c_complete(const LLTSCode status, void *user_data)
if (status < LLTS_OK)
{
- llinfos << "Image download failed!" << llendl;
+ LL_WARNS("Messaging") << "Image download failed!" << LL_ENDL;
}
else
{
@@ -458,7 +458,7 @@ void exported_j2c_complete(const LLTSCode status, void *user_data)
U8 *buffer = ImageUtility->allocateData(length);
if (fread(buffer, 1, length, fIn) != length)
{
- llwarns << "Short read" << llendl;
+ LL_WARNS("Messaging") << "Short read" << LL_ENDL;
}
fclose(fIn);
LLFile::remove(filename.c_str());
@@ -488,7 +488,7 @@ void exported_j2c_complete(const LLTSCode status, void *user_data)
{
if (fwrite(data, 1, data_size, fOut) != data_size)
{
- llwarns << "Short write" << llendl;
+ LL_WARNS("Messaging") << "Short write" << LL_ENDL;
}
fseek(fOut, 0, SEEK_SET);
fclose(fOut);
@@ -504,7 +504,7 @@ void exported_j2c_complete(const LLTSCode status, void *user_data)
++current_image_count;
if (current_image_count == exported_image_count && current_object_count == exported_object_count)
{
- llinfos << "*** Export textures complete ***" << llendl;
+ LL_INFOS("Messaging") << "*** Export textures complete ***" << LL_ENDL;
export_complete();
}
else
@@ -533,7 +533,7 @@ void process_places_reply(LLMessageSystem* msg, void** data)
}
else
{
- llwarns << "Got invalid PlacesReply message" << llendl;
+ LL_WARNS("Messaging") << "Got invalid PlacesReply message" << LL_ENDL;
}
}
@@ -705,7 +705,7 @@ public:
virtual ~LLDiscardAgentOffer() {}
virtual void done()
{
- lldebugs << "LLDiscardAgentOffer::done()" << llendl;
+ LL_DEBUGS("Messaging") << "LLDiscardAgentOffer::done()" << LL_ENDL;
LLUUID trash_id;
trash_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_TRASH);
bool notify = false;
@@ -729,9 +729,9 @@ public:
}
else
{
- llwarns << "DiscardAgentOffer unable to find: "
+ LL_WARNS("Messaging") << "DiscardAgentOffer unable to find: "
<< (trash_id.isNull() ? "trash " : "")
- << (mObjectID.isNull() ? "object" : "") << llendl;
+ << (mObjectID.isNull() ? "object" : "") << LL_ENDL;
}
gInventory.removeObserver(this);
if(notify)
@@ -766,14 +766,14 @@ bool check_offer_throttle(const std::string& from_name, bool check_only)
if(gThrottleTimer.checkExpirationAndReset(OFFER_THROTTLE_TIME))
{
- //llinfos << "Throttle Expired" << llendl;
+ LL_DEBUGS("Messaging") << "Throttle Expired" << LL_ENDL;
throttle_count=1;
throttle_logged=false;
return true;
}
else //has not expired
{
- //llinfos << "Throttle Not Expired, Count: " << throttle_count << llendl;
+ LL_DEBUGS("Messaging") << "Throttle Not Expired, Count: " << throttle_count << LL_ENDL;
// When downloading the initial inventory we get a lot of new items
// coming in and can't tell that from spam. JC
if (LLStartUp::getStartupState() >= STATE_STARTED
@@ -821,7 +821,7 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name)
item = gInventory.getItem(*it);
if(!item)
{
- llwarns << "Unable to show inventory item: " << *it << llendl;
+ LL_WARNS("Messaging") << "Unable to show inventory item: " << *it << LL_ENDL;
continue;
}
if(gInventory.isObjectDescendentOf(*it, trash_id))
@@ -880,7 +880,7 @@ void open_offer(const std::vector<LLUUID>& items, const std::string& from_name)
//don't dick with highlight while the user is working
//if(inventory_has_focus && !user_is_away)
// break;
- //llinfos << "Highlighting" << item->getUUID() << llendl;
+ LL_DEBUGS("Messaging") << "Highlighting" << item->getUUID() << LL_ENDL;
//highlight item
LLUICtrl* focus_ctrl = gFocusMgr.getKeyboardFocus();
@@ -1041,8 +1041,8 @@ void inventory_offer_callback(S32 button, void* user_data)
}
// we will want to open this item when it comes back.
- lldebugs << "Initializing an opener for tid: " << info->mTransactionID
- << llendl;
+ LL_DEBUGS("Messaging") << "Initializing an opener for tid: " << info->mTransactionID
+ << LL_ENDL;
switch (info->mIM)
{
case IM_INVENTORY_OFFERED:
@@ -1075,7 +1075,7 @@ void inventory_offer_callback(S32 button, void* user_data)
}
break;
default:
- llwarns << "inventory_offer_callback: unknown offer type" << llendl;
+ LL_WARNS("Messaging") << "inventory_offer_callback: unknown offer type" << LL_ENDL;
break;
} // end switch (info->mIM)
break;
@@ -1187,11 +1187,11 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task)
}
else
{
- llwarns << "LLAssetType::lookupHumanReadable() returned NULL - probably bad asset type: " << info->mType << llendl;
+ LL_WARNS("Messaging") << "LLAssetType::lookupHumanReadable() returned NULL - probably bad asset type: " << info->mType << LL_ENDL;
args["[OBJECTTYPE]"] = "";
// This seems safest, rather than propagating bogosity
- llwarns << "Forcing an inventory-decline for probably-bad asset type." << llendl;
+ LL_WARNS("Messaging") << "Forcing an inventory-decline for probably-bad asset type." << LL_ENDL;
inventory_offer_callback(IOR_DECLINE, info);
return;
}
@@ -1424,7 +1424,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
snprintf(buffer, sizeof(buffer), "%s%s", separator_string, (message+message_offset)); /* Flawfinder: ignore */
- llinfos << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << llendl;
+ LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
// add to IM panel, but do not bother the user
gIMMgr->addMessage(
@@ -1480,7 +1480,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
}
snprintf(buffer, sizeof(buffer), "%s%s%s", separator_string, saved,(message+message_offset)); /* Flawfinder: ignore */
- llinfos << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << llendl;
+ LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
if (!is_muted || is_linden)
{
@@ -1538,7 +1538,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
case IM_GROUP_NOTICE:
case IM_GROUP_NOTICE_REQUESTED:
{
- llinfos << "Received IM_GROUP_NOTICE message." << llendl;
+ LL_INFOS("Messaging") << "Received IM_GROUP_NOTICE message." << LL_ENDL;
// Read the binary bucket for more information.
struct notice_bucket_header_t
{
@@ -1557,7 +1557,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
if ( (binary_bucket_size < (S32)((sizeof(notice_bucket_header_t) + sizeof(U8))))
|| (binary_bucket[binary_bucket_size - 1] != '\0') )
{
- llwarns << "Malformed group notice binary bucket" << llendl;
+ LL_WARNS("Messaging") << "Malformed group notice binary bucket" << LL_ENDL;
break;
}
@@ -1623,7 +1623,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
}
else
{
- llinfos << "Received IM_GROUP_INVITATION message." << llendl;
+ LL_INFOS("Messaging") << "Received IM_GROUP_INVITATION message." << LL_ENDL;
// Read the binary bucket for more information.
struct invite_bucket_t
{
@@ -1634,7 +1634,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
// Make sure the binary bucket is the correct size.
if (binary_bucket_size != sizeof(invite_bucket_t))
{
- llwarns << "Malformed group invite binary bucket" << llendl;
+ LL_WARNS("Messaging") << "Malformed group invite binary bucket" << LL_ENDL;
break;
}
@@ -1673,7 +1673,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
if (sizeof(offer_agent_bucket_t) != binary_bucket_size)
{
- llwarns << "Malformed inventory offer from agent" << llendl;
+ LL_WARNS("Messaging") << "Malformed inventory offer from agent" << LL_ENDL;
break;
}
bucketp = (struct offer_agent_bucket_t*) &binary_bucket[0];
@@ -1684,7 +1684,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
{
if (sizeof(S8) != binary_bucket_size)
{
- llwarns << "Malformed inventory offer from object" << llendl;
+ LL_WARNS("Messaging") << "Malformed inventory offer from object" << LL_ENDL;
break;
}
info->mType = (LLAssetType::EType) binary_bucket[0];
@@ -1745,7 +1745,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
case IM_GROUP_ELECTION_DEPRECATED:
{
- llwarns << "Received IM: IM_GROUP_ELECTION_DEPRECATED" << llendl;
+ LL_WARNS("Messaging") << "Received IM: IM_GROUP_ELECTION_DEPRECATED" << LL_ENDL;
}
break;
@@ -1825,7 +1825,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
case IM_BUSY_AUTO_RESPONSE:
if (is_muted)
{
- lldebugs << "Ignoring busy response from " << from_id << llendl;
+ LL_DEBUGS("Messaging") << "Ignoring busy response from " << from_id << LL_ENDL;
return;
}
else
@@ -1873,16 +1873,16 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
// URLs sent by scripts (i.e. llLoadURL)
if (binary_bucket_size <= 0)
{
- llwarns << "bad binary_bucket_size: "
+ LL_WARNS("Messaging") << "bad binary_bucket_size: "
<< binary_bucket_size
- << " - aborting function." << llendl;
+ << " - aborting function." << LL_ENDL;
return;
}
char* url = new char[binary_bucket_size];
if (url == NULL)
{
- llerrs << "Memory Allocation failed" << llendl;
+ LL_ERRS("Messaging") << "Memory Allocation failed" << LL_ENDL;
return;
}
@@ -1943,8 +1943,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
break;
default:
- llwarns << "Instant message calling for unknown dialog "
- << (S32)dialog << llendl;
+ LL_WARNS("Messaging") << "Instant message calling for unknown dialog "
+ << (S32)dialog << LL_ENDL;
break;
}
@@ -2072,7 +2072,7 @@ void callingcard_offer_callback(S32 option, void* user_data)
void process_offer_callingcard(LLMessageSystem* msg, void**)
{
// someone has offered to form a friendship
- lldebugs << "callingcard offer" << llendl;
+ LL_DEBUGS("Messaging") << "callingcard offer" << LL_ENDL;
LLUUID source_id;
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, source_id);
@@ -2117,7 +2117,7 @@ void process_offer_callingcard(LLMessageSystem* msg, void**)
}
else
{
- llwarns << "Calling card offer from an unknown source." << llendl;
+ LL_WARNS("Messaging") << "Calling card offer from an unknown source." << LL_ENDL;
}
delete offerdata; // !=NULL if we didn't give ownership away
@@ -2310,10 +2310,10 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
break;
case CHAT_TYPE_START:
case CHAT_TYPE_STOP:
- llwarns << "Got chat type start/stop in main chat processing." << llendl;
+ LL_WARNS("Messaging") << "Got chat type start/stop in main chat processing." << LL_ENDL;
break;
default:
- llwarns << "Unknown type " << chat.mChatType << " in chat!" << llendl;
+ LL_WARNS("Messaging") << "Unknown type " << chat.mChatType << " in chat!" << LL_ENDL;
verb = " say, ";
break;
}
@@ -2406,7 +2406,7 @@ void process_teleport_progress(LLMessageSystem* msg, void**)
if((gAgent.getID() != agent_id)
|| (gAgent.getTeleportState() == LLAgent::TELEPORT_NONE))
{
- llwarns << "Unexpected teleport progress message." << llendl;
+ LL_WARNS("Messaging") << "Unexpected teleport progress message." << LL_ENDL;
return;
}
U32 teleport_flags = 0x0;
@@ -2421,7 +2421,7 @@ void process_teleport_progress(LLMessageSystem* msg, void**)
}
char buffer[MAX_STRING]; /* Flawfinder: ignore */
msg->getString("Info", "Message", MAX_STRING, buffer);
- lldebugs << "teleport progress: " << buffer << llendl;
+ LL_DEBUGS("Messaging") << "teleport progress: " << buffer << LL_ENDL;
//Sorta hacky...default to using simulator raw messages
//if we don't find the coresponding mapping in our progress mappings
@@ -2545,12 +2545,12 @@ BOOL LLPostTeleportNotifiers::tick()
// We're going to pretend to be a new agent
void process_teleport_finish(LLMessageSystem* msg, void**)
{
- //llinfos << "Got teleport location message" << llendl;
+ LL_DEBUGS("Messaging") << "Got teleport location message" << LL_ENDL;
LLUUID agent_id;
msg->getUUIDFast(_PREHASH_Info, _PREHASH_AgentID, agent_id);
if (agent_id != gAgent.getID())
{
- llwarns << "Got teleport notification for wrong agent!" << llendl;
+ LL_WARNS("Messaging") << "Got teleport notification for wrong agent!" << LL_ENDL;
return;
}
@@ -2618,8 +2618,8 @@ void process_teleport_finish(LLMessageSystem* msg, void**)
*/
// now, use the circuit info to tell simulator about us!
- llinfos << "process_teleport_finish() Enabling "
- << sim_host << " with code " << msg->mOurCircuitCode << llendl;
+ LL_INFOS("Messaging") << "process_teleport_finish() Enabling "
+ << sim_host << " with code " << msg->mOurCircuitCode << LL_ENDL;
msg->newMessageFast(_PREHASH_UseCircuitCode);
msg->nextBlockFast(_PREHASH_CircuitCode);
msg->addU32Fast(_PREHASH_Code, msg->getOurCircuitCode());
@@ -2680,12 +2680,12 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_SessionID, session_id);
if((gAgent.getID() != agent_id) || (gAgent.getSessionID() != session_id))
{
- llwarns << "Incorrect id in process_agent_movement_complete()"
- << llendl;
+ LL_WARNS("Messaging") << "Incorrect id in process_agent_movement_complete()"
+ << LL_ENDL;
return;
}
- llinfos << "process_agent_movement_complete()" << llendl;
+ LL_DEBUGS("Messaging") << "process_agent_movement_complete()" << LL_ENDL;
// *TODO: check timestamp to make sure the movement compleation
// makes sense.
@@ -2704,7 +2704,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
{
// Could happen if you were immediately god-teleported away on login,
// maybe other cases. Continue, but warn. JC
- llwarns << "agent_movement_complete() with NULL avatarp." << llendl;
+ LL_WARNS("Messaging") << "agent_movement_complete() with NULL avatarp." << LL_ENDL;
}
F32 x, y;
@@ -2714,19 +2714,19 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
{
if (gAgent.getRegion())
{
- llwarns << "current region " << gAgent.getRegion()->getOriginGlobal() << llendl;
+ LL_WARNS("Messaging") << "current region " << gAgent.getRegion()->getOriginGlobal() << LL_ENDL;
}
- llwarns << "Agent being sent to invalid home region: "
+ LL_WARNS("Messaging") << "Agent being sent to invalid home region: "
<< x << ":" << y
<< " current pos " << gAgent.getPositionGlobal()
- << llendl;
+ << LL_ENDL;
LLAppViewer::instance()->forceDisconnect("You were sent to an invalid region.");
return;
}
- llinfos << "Changing home region to " << x << ":" << y << llendl;
+ LL_INFOS("Messaging") << "Changing home region to " << x << ":" << y << LL_ENDL;
// set our upstream host the new simulator and shuffle things as
// appropriate.
@@ -2846,11 +2846,11 @@ void process_crossed_region(LLMessageSystem* msg, void**)
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_SessionID, session_id);
if((gAgent.getID() != agent_id) || (gAgent.getSessionID() != session_id))
{
- llwarns << "Incorrect id in process_crossed_region()"
- << llendl;
+ LL_WARNS("Messaging") << "Incorrect id in process_crossed_region()"
+ << LL_ENDL;
return;
}
- llinfos << "process_crossed_region()" << llendl;
+ LL_INFOS("Messaging") << "process_crossed_region()" << LL_ENDL;
U32 sim_ip;
msg->getIPAddrFast(_PREHASH_RegionData, _PREHASH_SimIP, sim_ip);
@@ -2978,24 +2978,24 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
/*
if (head_rot_chg < THRESHOLD_HEAD_ROT_QDOT)
{
- //llinfos << "head rot " << head_rotation << llendl;
- llinfos << "head_rot_chg = " << head_rot_chg << llendl;
+ //LL_INFOS("Messaging") << "head rot " << head_rotation << LL_ENDL;
+ LL_INFOS("Messaging") << "head_rot_chg = " << head_rot_chg << LL_ENDL;
}
if (cam_rot_chg.magVec() > ROTATION_THRESHOLD)
{
- llinfos << "cam rot " << cam_rot_chg.magVec() << llendl;
+ LL_INFOS("Messaging") << "cam rot " << cam_rot_chg.magVec() << LL_ENDL;
}
if (cam_center_chg.magVec() > TRANSLATE_THRESHOLD)
{
- llinfos << "cam center " << cam_center_chg.magVec() << llendl;
+ LL_INFOS("Messaging") << "cam center " << cam_center_chg.magVec() << LL_ENDL;
}
// if (drag_delta_chg.magVec() > TRANSLATE_THRESHOLD)
// {
-// llinfos << "drag delta " << drag_delta_chg.magVec() << llendl;
+// LL_INFOS("Messaging") << "drag delta " << drag_delta_chg.magVec() << LL_ENDL;
// }
if (control_flag_change)
{
- llinfos << "dcf = " << control_flag_change << llendl;
+ LL_INFOS("Messaging") << "dcf = " << control_flag_change << LL_ENDL;
}
*/
@@ -3044,7 +3044,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
// if (camera_pos_agent.mV[VY] > 255.f)
// {
-// llinfos << "Sending camera center " << camera_pos_agent << llendl;
+// LL_INFOS("Messaging") << "Sending camera center " << camera_pos_agent << LL_ENDL;
// }
msg->addVector3Fast(_PREHASH_CameraCenter, camera_pos_agent);
@@ -3059,12 +3059,12 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
{
if (control_flags & AGENT_CONTROL_LBUTTON_DOWN)
{
- llinfos << "AgentUpdate left button down" << llendl;
+ LL_INFOS("Messaging") << "AgentUpdate left button down" << LL_ENDL;
}
if (control_flags & AGENT_CONTROL_LBUTTON_UP)
{
- llinfos << "AgentUpdate left button up" << llendl;
+ LL_INFOS("Messaging") << "AgentUpdate left button up" << LL_ENDL;
}
}
@@ -3079,7 +3079,7 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
gAgent.sendReliableMessage();
}
- //llinfos << "agent " << avatar_pos_agent << " cam " << camera_pos_agent << llendl;
+// LL_DEBUGS("Messaging") << "agent " << avatar_pos_agent << " cam " << camera_pos_agent << LL_ENDL;
// Copy the old data
last_head_rot = head_rotation;
@@ -3192,13 +3192,13 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
gMessageSystem->getSenderPort());
if (id == LLUUID::null)
{
- //llinfos << "Unknown kill for local " << local_id << llendl;
+ LL_DEBUGS("Messaging") << "Unknown kill for local " << local_id << LL_ENDL;
gObjectList.mNumUnknownKills++;
continue;
}
else
{
- //llinfos << "Kill message for local " << local_id << llendl;
+ LL_DEBUGS("Messaging") << "Kill message for local " << local_id << LL_ENDL;
}
LLSelectMgr::getInstance()->removeObjectFromSelections(id);
@@ -3228,7 +3228,7 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
}
else
{
- llwarns << "Object in UUID lookup, but not on object list in kill!" << llendl;
+ LL_WARNS("Messaging") << "Object in UUID lookup, but not on object list in kill!" << LL_ENDL;
gObjectList.mNumUnknownKills++;
}
}
@@ -3257,8 +3257,8 @@ void process_time_synch(LLMessageSystem *mesgsys, void **user_data)
LLWorld::getInstance()->setSpaceTimeUSec(space_time_usec);
- //lldebugs << "time_synch() - " << sun_direction << ", " << sun_ang_velocity
- // << ", " << phase << llendl;
+ //LL_DEBUGS("Messaging") << "time_synch() - " << sun_direction << ", " << sun_ang_velocity
+ // << ", " << phase << LL_ENDL;
gSky.setSunPhase(phase);
gSky.setSunTargetDirection(sun_direction, sun_ang_velocity);
@@ -3510,7 +3510,8 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data)
LLViewerStats::getInstance()->mPhysicsMemoryAllocated.addValue(stat_value);
break;
default:
-// llwarns << "Unknown stat id" << stat_id << llendl;
+ // Used to be a commented out warning.
+ LL_DEBUGS("Messaging") << "Unknown stat id" << stat_id << LL_ENDL;
break;
}
}
@@ -3577,7 +3578,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
if (!avatarp)
{
// no agent by this ID...error?
- llwarns << "Received animation state for unknown avatar" << uuid << llendl;
+ LL_WARNS("Messaging") << "Received animation state for unknown avatar" << uuid << LL_ENDL;
return;
}
@@ -3595,7 +3596,7 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
mesgsys->getUUIDFast(_PREHASH_AnimationList, _PREHASH_AnimID, animation_id, i);
mesgsys->getS32Fast(_PREHASH_AnimationList, _PREHASH_AnimSequenceID, anim_sequence_id, i);
- //llinfos << "Anim sequence ID: " << anim_sequence_id << llendl;
+ LL_DEBUGS("Messaging") << "Anim sequence ID: " << anim_sequence_id << LL_ENDL;
avatarp->mSignaledAnimations[animation_id] = anim_sequence_id;
@@ -3655,7 +3656,7 @@ void process_avatar_appearance(LLMessageSystem *mesgsys, void **user_data)
}
else
{
- llwarns << "avatar_appearance sent for unknown avatar " << uuid << llendl;
+ LL_WARNS("Messaging") << "avatar_appearance sent for unknown avatar " << uuid << LL_ENDL;
}
}
@@ -3721,7 +3722,7 @@ void process_avatar_sit_response(LLMessageSystem *mesgsys, void **user_data)
}
else
{
- llwarns << "Received sit approval for unknown object " << sitObjectID << llendl;
+ LL_WARNS("Messaging") << "Received sit approval for unknown object " << sitObjectID << LL_ENDL;
}
}
@@ -3871,13 +3872,13 @@ void process_name_value(LLMessageSystem *mesgsys, void **user_data)
for (i = 0; i < num_blocks; i++)
{
mesgsys->getStringFast(_PREHASH_NameValueData, _PREHASH_NVPair, NAME_VALUE_BUF_SIZE, temp_str, i);
- llinfos << "Added to object Name Value: " << temp_str << llendl;
+ LL_INFOS("Messaging") << "Added to object Name Value: " << temp_str << LL_ENDL;
object->addNVPair(temp_str);
}
}
else
{
- llinfos << "Can't find object " << id << " to add name value pair" << llendl;
+ LL_INFOS("Messaging") << "Can't find object " << id << " to add name value pair" << LL_ENDL;
}
}
@@ -3897,13 +3898,13 @@ void process_remove_name_value(LLMessageSystem *mesgsys, void **user_data)
for (i = 0; i < num_blocks; i++)
{
mesgsys->getStringFast(_PREHASH_NameValueData, _PREHASH_NVPair, NAME_VALUE_BUF_SIZE, temp_str, i);
- llinfos << "Removed from object Name Value: " << temp_str << llendl;
+ LL_INFOS("Messaging") << "Removed from object Name Value: " << temp_str << LL_ENDL;
object->removeNVPair(temp_str);
}
}
else
{
- llinfos << "Can't find object " << id << " to remove name value pair" << llendl;
+ LL_INFOS("Messaging") << "Can't find object " << id << " to remove name value pair" << LL_ENDL;
}
}
@@ -3983,8 +3984,8 @@ void process_money_balance_reply( LLMessageSystem* msg, void** )
msg->getS32("MoneyData", "SquareMetersCredit", credit);
msg->getS32("MoneyData", "SquareMetersCommitted", committed);
msg->getStringFast(_PREHASH_MoneyData, _PREHASH_Description, STD_STRING_BUF_SIZE, desc);
- llinfos << "L$, credit, committed: " << balance << " " << credit << " "
- << committed << llendl;
+ LL_INFOS("Messaging") << "L$, credit, committed: " << balance << " " << credit << " "
+ << committed << LL_ENDL;
if (gStatusBar)
{
@@ -4028,10 +4029,10 @@ void process_money_balance_reply( LLMessageSystem* msg, void** )
const S32 POP_FRONT_SIZE = 12;
if(recent.size() > MAX_LOOKBACK)
{
- lldebugs << "Removing oldest transaction records" << llendl;
+ LL_DEBUGS("Messaging") << "Removing oldest transaction records" << LL_ENDL;
recent.erase(recent.begin(), recent.begin() + POP_FRONT_SIZE);
}
- //lldebugs << "Pushing back transaction " << tid << llendl;
+ //LL_DEBUGS("Messaging") << "Pushing back transaction " << tid << LL_ENDL;
recent.push_back(tid);
}
}
@@ -4476,9 +4477,9 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
switch (question_throttle.noteAction(throttle_owner_name))
{
case LLStringThrottle::THROTTLE_NEWLY_BLOCKED:
- llinfos << "process_script_question throttled"
+ LL_INFOS("Messaging") << "process_script_question throttled"
<< " owner_name:" << owner_name
- << llendl;
+ << LL_ENDL;
// Fall through
case LLStringThrottle::THROTTLE_BLOCKED:
@@ -4540,7 +4541,7 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
void process_derez_container(LLMessageSystem *msg, void**)
{
- llwarns << "call to deprecated process_derez_container" << llendl;
+ LL_WARNS("Messaging") << "call to deprecated process_derez_container" << LL_ENDL;
}
void container_inventory_arrived(LLViewerObject* object,
@@ -4548,7 +4549,7 @@ void container_inventory_arrived(LLViewerObject* object,
S32 serial_num,
void* data)
{
- llinfos << "container_inventory_arrived()" << llendl;
+ LL_DEBUGS("Messaging") << "container_inventory_arrived()" << LL_ENDL;
if( gAgent.cameraMouselook() )
{
gAgent.changeCameraToDefault();
@@ -4694,7 +4695,7 @@ void process_teleport_local(LLMessageSystem *msg,void**)
msg->getUUIDFast(_PREHASH_Info, _PREHASH_AgentID, agent_id);
if (agent_id != gAgent.getID())
{
- llwarns << "Got teleport notification for wrong agent!" << llendl;
+ LL_WARNS("Messaging") << "Got teleport notification for wrong agent!" << LL_ENDL;
return;
}
@@ -4924,8 +4925,8 @@ void process_user_info_reply(LLMessageSystem* msg, void**)
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, agent_id);
if(agent_id != gAgent.getID())
{
- llwarns << "process_user_info_reply - "
- << "wrong agent id." << llendl;
+ LL_WARNS("Messaging") << "process_user_info_reply - "
+ << "wrong agent id." << LL_ENDL;
}
BOOL im_via_email;
@@ -5133,7 +5134,7 @@ void process_load_url(LLMessageSystem* msg, void**)
if (LLMuteList::getInstance()->isMuted(infop->mObjectID, infop->mObjectName) ||
LLMuteList::getInstance()->isMuted(infop->mOwnerID))
{
- llinfos<<"Ignoring load_url from muted object/owner."<<llendl;
+ LL_INFOS("Messaging")<<"Ignoring load_url from muted object/owner."<<LL_ENDL;
delete infop;
infop = NULL;
return;
@@ -5162,7 +5163,7 @@ void process_initiate_download(LLMessageSystem* msg, void**)
msg->getUUID("AgentData", "AgentID", agent_id);
if (agent_id != gAgent.getID())
{
- llwarns << "Initiate download for wrong agent" << llendl;
+ LL_WARNS("Messaging") << "Initiate download for wrong agent" << LL_ENDL;
return;
}
@@ -5288,7 +5289,7 @@ void onCovenantLoadComplete(LLVFS *vfs,
LLAssetType::EType type,
void* user_data, S32 status, LLExtStat ext_status)
{
- llinfos << "onCovenantLoadComplete()" << llendl;
+ LL_DEBUGS("Messaging") << "onCovenantLoadComplete()" << LL_ENDL;
std::string covenant_text;
if(0 == status)
{
@@ -5299,7 +5300,7 @@ void onCovenantLoadComplete(LLVFS *vfs,
char* buffer = new char[file_length+1];
if (buffer == NULL)
{
- llerrs << "Memory Allocation failed" << llendl;
+ LL_ERRS("Messaging") << "Memory Allocation failed" << LL_ENDL;
return;
}
@@ -5316,7 +5317,7 @@ void onCovenantLoadComplete(LLVFS *vfs,
file_length+1);
if( !editor->importBuffer( buffer ) )
{
- llwarns << "Problem importing estate covenant." << llendl;
+ LL_WARNS("Messaging") << "Problem importing estate covenant." << LL_ENDL;
covenant_text = "Problem importing estate covenant.";
}
else
@@ -5329,7 +5330,7 @@ void onCovenantLoadComplete(LLVFS *vfs,
}
else
{
- llwarns << "Problem importing estate covenant: Covenant file format error." << llendl;
+ LL_WARNS("Messaging") << "Problem importing estate covenant: Covenant file format error." << LL_ENDL;
covenant_text = "Problem importing estate covenant: Covenant file format error.";
}
}
@@ -5351,7 +5352,7 @@ void onCovenantLoadComplete(LLVFS *vfs,
covenant_text = "Unable to load estate covenant at this time.";
}
- llwarns << "Problem loading notecard: " << status << llendl;
+ LL_WARNS("Messaging") << "Problem loading notecard: " << status << LL_ENDL;
}
LLPanelEstateCovenant::updateCovenantText(covenant_text, asset_uuid);
LLPanelLandCovenant::updateCovenantText(covenant_text);
@@ -5369,7 +5370,7 @@ void process_feature_disabled_message(LLMessageSystem* msg, void**)
msg->getUUIDFast(_PREHASH_FailureInfo,_PREHASH_AgentID,agentID);
msg->getUUIDFast(_PREHASH_FailureInfo,_PREHASH_TransactionID,transactionID);
- llwarns << "Blacklisted Feature Response:" << &messageText[0] << llendl;
+ LL_WARNS("Messaging") << "Blacklisted Feature Response:" << &messageText[0] << LL_ENDL;
}
// ------------------------------------------------------------
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 5d7bac7ab3..d3b7a77297 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1307,6 +1307,7 @@ void LLViewerRegion::unpackRegionHandshake()
class BaseCapabilitiesComplete : public LLHTTPClient::Responder
{
+ LOG_CLASS(BaseCapabilitiesComplete);
public:
BaseCapabilitiesComplete(LLViewerRegion* region)
: mRegion(region)
@@ -1314,8 +1315,7 @@ public:
void error(U32 statusNum, const std::string& reason)
{
- llinfos << "BaseCapabilitiesComplete::error "
- << statusNum << ": " << reason << llendl;
+ LL_WARNS2("AppInit", "Capabilities") << statusNum << ": " << reason << LL_ENDL;
if (STATE_SEED_GRANTED_WAIT == LLStartUp::getStartupState())
{
@@ -1329,8 +1329,8 @@ public:
for(iter = content.beginMap(); iter != content.endMap(); ++iter)
{
mRegion->setCapability(iter->first, iter->second);
- llinfos << "BaseCapabilitiesComplete::result got capability for "
- << iter->first << llendl;
+ LL_DEBUGS2("AppInit", "Capabilities") << "got capability for "
+ << iter->first << LL_ENDL;
/* HACK we're waiting for the ServerReleaseNotes */
if ((iter->first == "ServerReleaseNotes") && (LLFloaterReleaseMsg::sDisplayMessage))
diff --git a/indra/newview/llviewerthrottle.cpp b/indra/newview/llviewerthrottle.cpp
index 9a9fcdd9ac..c23a74c533 100644
--- a/indra/newview/llviewerthrottle.cpp
+++ b/indra/newview/llviewerthrottle.cpp
@@ -182,9 +182,9 @@ void LLViewerThrottleGroup::dump()
S32 i;
for (i = 0; i < TC_EOF; i++)
{
- llinfos << LLViewerThrottle::sNames[i] << ": " << mThrottles[i] << llendl;
+ LL_DEBUGS("Throttle") << LLViewerThrottle::sNames[i] << ": " << mThrottles[i] << LL_ENDL;
}
- llinfos << "Total: " << mThrottleTotal << llendl;
+ LL_DEBUGS("Throttle") << "Total: " << mThrottleTotal << LL_ENDL;
}
class LLBPSListener : public LLSimpleListener
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 0e39c9d5d4..5d3487517b 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1529,9 +1529,9 @@ LLViewerWindow::LLViewerWindow(
ignore_pixel_depth,
gSavedSettings.getU32("RenderFSAASamples"));
#if LL_WINDOWS
- if (!LLWinDebug::setupExceptionHandler())
+ if (!LLWinDebug::checkExceptionHandler())
{
- llwarns << " Someone took over my exception handler (post createWindow)!" << llendl;
+ LL_WARNS("Window") << " Someone took over my exception handler (post createWindow)!" << LL_ENDL;
}
#endif
@@ -1542,8 +1542,8 @@ LLViewerWindow::LLViewerWindow(
llwarns << "Unable to create window, be sure screen is set at 32-bit color and your graphics driver is configured correctly. See README-linux.txt or README-solaris.txt for further information."
<< llendl;
#else
- llwarns << "Unable to create window, be sure screen is set at 32-bit color in Control Panels->Display->Settings"
- << llendl;
+ LL_WARNS("Window") << "Unable to create window, be sure screen is set at 32-bit color in Control Panels->Display->Settings"
+ << LL_ENDL;
#endif
LLAppViewer::instance()->forceExit(1);
}
@@ -1569,7 +1569,7 @@ LLViewerWindow::LLViewerWindow(
// We want to set this stuff up BEFORE we initialize the pipeline, so we can turn off
// stuff like AGP if we think that it'll crash the viewer.
//
- llinfos << "Loading feature tables." << llendl;
+ LL_DEBUGS("Window") << "Loading feature tables." << LL_ENDL;
LLFeatureManager::getInstance()->init();
@@ -4939,7 +4939,7 @@ void LLViewerWindow::restoreGL(const LLString& progress_message)
}
llinfos << "...Restoring GL done" << llendl;
#if LL_WINDOWS
- if (SetUnhandledExceptionFilter(LLWinDebug::handleException) != LLWinDebug::handleException)
+ if(!LLWinDebug::checkExceptionHandler())
{
llwarns << " Someone took over my exception handler (post restoreGL)!" << llendl;
}
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index bba9fe1ccf..96f69e9472 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -268,7 +268,7 @@ LLIOPipe::EStatus LLVivoxProtocolParser::process_impl(
}
else
{
- llinfos << "parsing: " << mInput.substr(start, delim - start) << llendl;
+ LL_INFOS("Voice") << "parsing: " << mInput.substr(start, delim - start) << LL_ENDL;
}
}
@@ -287,12 +287,12 @@ LLIOPipe::EStatus LLVivoxProtocolParser::process_impl(
if(start != 0)
mInput = mInput.substr(start);
-// llinfos << "at end, mInput is: " << mInput << llendl;
+ LL_DEBUGS("Voice") << "at end, mInput is: " << mInput << LL_ENDL;
if(!gVoiceClient->mConnected)
{
// If voice has been disabled, we just want to close the socket. This does so.
- llinfos << "returning STATUS_STOP" << llendl;
+ LL_INFOS("Voice") << "returning STATUS_STOP" << LL_ENDL;
return STATUS_STOP;
}
@@ -366,17 +366,17 @@ void LLVivoxProtocolParser::StartTag(const char *tag, const char **attr)
}
}
}
- //llinfos << tag << " (" << responseDepth << ")" << llendl;
+ LL_DEBUGS("Voice") << tag << " (" << responseDepth << ")" << LL_ENDL;
}
else
{
if (ignoringTags)
{
- //llinfos << "ignoring tag " << tag << " (depth = " << responseDepth << ")" << llendl;
+ LL_DEBUGS("Voice") << "ignoring tag " << tag << " (depth = " << responseDepth << ")" << LL_ENDL;
}
else
{
- //llinfos << tag << " (" << responseDepth << ")" << llendl;
+ LL_DEBUGS("Voice") << tag << " (" << responseDepth << ")" << LL_ENDL;
// Ignore the InputXml stuff so we don't get confused
if (strcmp("InputXml", tag) == 0)
@@ -385,7 +385,7 @@ void LLVivoxProtocolParser::StartTag(const char *tag, const char **attr)
ignoreDepth = responseDepth;
accumulateText = false;
- //llinfos << "starting ignore, ignoreDepth is " << ignoreDepth << llendl;
+ LL_DEBUGS("Voice") << "starting ignore, ignoreDepth is " << ignoreDepth << LL_ENDL;
}
else if (strcmp("CaptureDevices", tag) == 0)
{
@@ -413,18 +413,18 @@ void LLVivoxProtocolParser::EndTag(const char *tag)
{
if (ignoreDepth == responseDepth)
{
- //llinfos << "end of ignore" << llendl;
+ LL_DEBUGS("Voice") << "end of ignore" << LL_ENDL;
ignoringTags = false;
}
else
{
- //llinfos << "ignoring tag " << tag << " (depth = " << responseDepth << ")" << llendl;
+ LL_DEBUGS("Voice") << "ignoring tag " << tag << " (depth = " << responseDepth << ")" << LL_ENDL;
}
}
if (!ignoringTags)
{
- //llinfos << "processing tag " << tag << " (depth = " << responseDepth << ")" << llendl;
+ LL_DEBUGS("Voice") << "processing tag " << tag << " (depth = " << responseDepth << ")" << LL_ENDL;
// Closing a tag. Finalize the text we've accumulated and reset
if (strcmp("ReturnCode", tag) == 0)
@@ -531,7 +531,7 @@ void LLVivoxProtocolParser::CharData(const char *buffer, int length)
void LLVivoxProtocolParser::processResponse(std::string tag)
{
- //llinfos << tag << llendl;
+ LL_DEBUGS("Voice") << tag << LL_ENDL;
if (isEvent)
{
@@ -700,9 +700,9 @@ private:
void LLVoiceClientCapResponder::error(U32 status, const std::string& reason)
{
- llwarns << "LLVoiceClientCapResponder::error("
+ LL_WARNS("Voice") << "LLVoiceClientCapResponder::error("
<< status << ": " << reason << ")"
- << llendl;
+ << LL_ENDL;
}
void LLVoiceClientCapResponder::result(const LLSD& content)
@@ -710,8 +710,8 @@ void LLVoiceClientCapResponder::result(const LLSD& content)
LLSD::map_const_iterator iter;
for(iter = content.beginMap(); iter != content.endMap(); ++iter)
{
- llinfos << "LLVoiceClientCapResponder::result got "
- << iter->first << llendl;
+ LL_DEBUGS("Voice") << "LLVoiceClientCapResponder::result got "
+ << iter->first << LL_ENDL;
}
if ( content.has("voice_credentials") )
@@ -918,7 +918,7 @@ bool LLVoiceClient::writeString(const std::string &str)
apr_size_t size = (apr_size_t)str.size();
apr_size_t written = size;
-// llinfos << "sending: " << str << llendl;
+ LL_DEBUGS("Voice") << "sending: " << str << LL_ENDL;
// MBW -- XXX -- check return code - sockets will fail (broken, etc.)
err = apr_socket_send(
@@ -941,7 +941,7 @@ bool LLVoiceClient::writeString(const std::string &str)
{
// Assume any socket error means something bad. For now, just close the socket.
char buf[MAX_STRING];
- llwarns << "apr error " << err << " ("<< apr_strerror(err, buf, MAX_STRING) << ") sending data to vivox daemon." << llendl;
+ LL_WARNS("Voice") << "apr error " << err << " ("<< apr_strerror(err, buf, MAX_STRING) << ") sending data to vivox daemon." << LL_ENDL;
daemonDied();
}
}
@@ -965,7 +965,7 @@ void LLVoiceClient::connectorCreate()
if(savedLogLevel != "-1")
{
- llinfos << "creating connector with logging enabled" << llendl;
+ LL_DEBUGS("Voice") << "creating connector with logging enabled" << LL_ENDL;
loglevel = "10";
logpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, "");
}
@@ -1014,7 +1014,7 @@ void LLVoiceClient::userAuthorized(const std::string& firstName, const std::stri
mAccountDisplayName += " ";
mAccountDisplayName += lastName;
- llinfos << "name \"" << mAccountDisplayName << "\" , ID " << agentID << llendl;
+ LL_INFOS("Voice") << "name \"" << mAccountDisplayName << "\" , ID " << agentID << LL_ENDL;
std::string gridname = gGridName;
LLString::toLower(gridname);
@@ -1065,13 +1065,13 @@ void LLVoiceClient::login(
if((getState() >= stateLoggingIn) && (getState() < stateLoggedOut))
{
// Already logged in. This is an internal error.
- llerrs << "called from wrong state." << llendl;
+ LL_ERRS("Voice") << "Can't login again. Called from wrong state." << LL_ENDL;
}
else if ( accountName != mAccountName )
{
//TODO: error?
- llinfos << "Wrong account name! " << accountName
- << " instead of " << mAccountName << llendl;
+ LL_WARNS("Voice") << "Wrong account name! " << accountName
+ << " instead of " << mAccountName << LL_ENDL;
}
else
{
@@ -1167,7 +1167,7 @@ const char *LLVoiceClientStatusObserver::status2string(LLVoiceClientStatusObserv
void LLVoiceClient::setState(state inState)
{
- llinfos << "entering state " << state2string(inState) << llendl;
+ LL_DEBUGS("Voice") << "entering state " << state2string(inState) << LL_ENDL;
mState = inState;
}
@@ -1188,7 +1188,7 @@ void LLVoiceClient::stateMachine()
if(!mConnected)
{
// if voice was turned off after the daemon was launched but before we could connect to it, we may need to issue a kill.
- llinfos << "Disabling voice before connection to daemon, terminating." << llendl;
+ LL_INFOS("Voice") << "Disabling voice before connection to daemon, terminating." << LL_ENDL;
killGateway();
}
@@ -1213,7 +1213,7 @@ void LLVoiceClient::stateMachine()
std::string regionName = region->getName();
std::string capURI = region->getCapability("ParcelVoiceInfoRequest");
-// llinfos << "Region name = \"" << regionName <<"\", " << "parcel local ID = " << parcelLocalID << llendl;
+ LL_DEBUGS("Voice") << "Region name = \"" << regionName <<"\", " << "parcel local ID = " << parcelLocalID << LL_ENDL;
// The region name starts out empty and gets filled in later.
// Also, the cap gets filled in a short time after the region cross, but a little too late for our purposes.
@@ -1277,7 +1277,7 @@ void LLVoiceClient::stateMachine()
args += " -ll ";
args += loglevel;
-// llinfos << "Args for SLVoice: " << args << llendl;
+ LL_DEBUGS("Voice") << "Args for SLVoice: " << args << LL_ENDL;
#if LL_WINDOWS
PROCESS_INFORMATION pinfo;
@@ -1349,7 +1349,7 @@ void LLVoiceClient::stateMachine()
}
else
{
- llinfos << exe_path << "not found." << llendl
+ LL_INFOS("Voice") << exe_path << "not found." << LL_ENDL
}
}
else
@@ -1376,7 +1376,7 @@ void LLVoiceClient::stateMachine()
break;
case stateDaemonLaunched:
-// llinfos << "Connecting to vivox daemon" << llendl;
+ LL_DEBUGS("Voice") << "Connecting to vivox daemon" << LL_ENDL;
if(mUpdateTimer.hasExpired())
{
mUpdateTimer.setTimerExpirySec(CONNECT_THROTTLE_SECONDS);
@@ -1533,7 +1533,7 @@ void LLVoiceClient::stateMachine()
if(mTuningMicVolumeDirty)
{
- llinfos << "setting tuning mic level to " << mTuningMicVolume << llendl;
+ LL_INFOS("Voice") << "setting tuning mic level to " << mTuningMicVolume << LL_ENDL;
stream
<< "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetMicLevel.1\">"
<< "<Level>" << mTuningMicVolume << "</Level>"
@@ -1584,12 +1584,12 @@ void LLVoiceClient::stateMachine()
if(mLoginRetryCount > MAX_LOGIN_RETRIES)
{
- llinfos << "too many login retries, giving up." << llendl;
+ LL_WARNS("Voice") << "too many login retries, giving up." << LL_ENDL;
setState(stateLoginFailed);
}
else
{
- llinfos << "will retry login in " << LOGIN_RETRY_SECONDS << " seconds." << llendl;
+ LL_INFOS("Voice") << "will retry login in " << LOGIN_RETRY_SECONDS << " seconds." << LL_ENDL;
mUpdateTimer.start();
mUpdateTimer.setTimerExpirySec(LOGIN_RETRY_SECONDS);
setState(stateLoginRetryWait);
@@ -1849,7 +1849,7 @@ void LLVoiceClient::stateMachine()
case stateJoinSessionFailed:
// Transition to error state. Send out any notifications here.
- llwarns << "stateJoinSessionFailed: (" << mVivoxErrorStatusCode << "): " << mVivoxErrorStatusString << llendl;
+ LL_WARNS("Voice") << "stateJoinSessionFailed: (" << mVivoxErrorStatusCode << "): " << mVivoxErrorStatusString << LL_ENDL;
notifyStatusObservers(LLVoiceClientStatusObserver::ERROR_UNKNOWN);
setState(stateJoinSessionFailedWaiting);
break;
@@ -1869,8 +1869,7 @@ void LLVoiceClient::stateMachine()
case stateMicTuningNoLogin:
// *TODO: Implement me.
- llwarns << "stateMicTuningNoLogin not handled"
- << llendl;
+ LL_WARNS("Voice") << "stateMicTuningNoLogin not handled" << LL_ENDL;
break;
}
@@ -1939,7 +1938,7 @@ void LLVoiceClient::channelGetListSendMessage()
void LLVoiceClient::sessionCreateSendMessage()
{
- llinfos << "requesting join: " << mNextSessionURI << llendl;
+ LL_DEBUGS("Voice") << "requesting join: " << mNextSessionURI << LL_ENDL;
mSessionURI = mNextSessionURI;
mNonSpatialChannel = !mNextSessionSpatial;
@@ -1979,7 +1978,7 @@ void LLVoiceClient::sessionCreateSendMessage()
void LLVoiceClient::sessionConnectSendMessage()
{
- llinfos << "connecting to session handle: " << mNextSessionHandle << llendl;
+ LL_DEBUGS("Voice") << "connecting to session handle: " << mNextSessionHandle << LL_ENDL;
mSessionHandle = mNextSessionHandle;
mSessionURI = mNextP2PSessionURI;
@@ -2008,7 +2007,7 @@ void LLVoiceClient::sessionTerminate()
void LLVoiceClient::sessionTerminateSendMessage()
{
- llinfos << "leaving session: " << mSessionURI << llendl;
+ LL_DEBUGS("Voice") << "leaving session: " << mSessionURI << LL_ENDL;
switch(getState())
{
@@ -2027,7 +2026,7 @@ void LLVoiceClient::sessionTerminateSendMessage()
}
else
{
- llwarns << "called with no session handle" << llendl;
+ LL_WARNS("Voice") << "called with no session handle" << LL_ENDL;
setState(stateSessionTerminated);
}
break;
@@ -2037,14 +2036,14 @@ void LLVoiceClient::sessionTerminateSendMessage()
break;
default:
- llwarns << "called from unknown state" << llendl;
+ LL_WARNS("Voice") << "called from unknown state" << LL_ENDL;
break;
}
}
void LLVoiceClient::sessionTerminateByHandle(std::string &sessionHandle)
{
- llinfos << "Sending Session.Terminate with handle " << sessionHandle << llendl;
+ LL_DEBUGS("Voice") << "Sending Session.Terminate with handle " << sessionHandle << LL_ENDL;
std::ostringstream stream;
stream
@@ -2079,14 +2078,14 @@ void LLVoiceClient::getRenderDevicesSendMessage()
void LLVoiceClient::clearCaptureDevices()
{
// MBW -- XXX -- do something here
- llinfos << "called" << llendl;
+ LL_DEBUGS("Voice") << "called" << LL_ENDL;
mCaptureDevices.clear();
}
void LLVoiceClient::addCaptureDevice(const std::string& name)
{
// MBW -- XXX -- do something here
- llinfos << name << llendl;
+ LL_DEBUGS("Voice") << name << LL_ENDL;
mCaptureDevices.push_back(name);
}
@@ -2119,14 +2118,14 @@ void LLVoiceClient::setCaptureDevice(const std::string& name)
void LLVoiceClient::clearRenderDevices()
{
// MBW -- XXX -- do something here
- llinfos << "called" << llendl;
+ LL_DEBUGS("Voice") << "called" << LL_ENDL;
mRenderDevices.clear();
}
void LLVoiceClient::addRenderDevice(const std::string& name)
{
// MBW -- XXX -- do something here
- llinfos << name << llendl;
+ LL_DEBUGS("Voice") << name << LL_ENDL;
mRenderDevices.push_back(name);
}
@@ -2210,7 +2209,7 @@ void LLVoiceClient::tuningRenderStopSendMessage()
void LLVoiceClient::tuningCaptureStartSendMessage(int duration)
{
- llinfos << "sending CaptureAudioStart" << llendl;
+ LL_DEBUGS("Voice") << "sending CaptureAudioStart" << LL_ENDL;
std::ostringstream stream;
stream
@@ -2223,7 +2222,7 @@ void LLVoiceClient::tuningCaptureStartSendMessage(int duration)
void LLVoiceClient::tuningCaptureStopSendMessage()
{
- llinfos << "sending CaptureAudioStop" << llendl;
+ LL_DEBUGS("Voice") << "sending CaptureAudioStop" << LL_ENDL;
std::ostringstream stream;
stream
@@ -2296,7 +2295,7 @@ void LLVoiceClient::refreshDeviceLists(bool clearCurrentList)
void LLVoiceClient::daemonDied()
{
// The daemon died, so the connection is gone. Reset everything and start over.
- llwarns << "Connection to vivox daemon lost. Resetting state."<< llendl;
+ LL_WARNS("Voice") << "Connection to vivox daemon lost. Resetting state."<< LL_ENDL;
closeSocket();
removeAllParticipants();
@@ -2332,7 +2331,7 @@ void LLVoiceClient::sendPositionalUpdate(void)
u = mAvatarRot.getUpRow();
a = mAvatarRot.getFwdRow();
-// llinfos << "Sending speaker position " << mSpeakerPosition << llendl;
+ LL_DEBUGS("Voice") << "Sending speaker position " << mAvatarPosition << LL_ENDL;
stream
<< "<Position>"
@@ -2395,7 +2394,7 @@ void LLVoiceClient::sendPositionalUpdate(void)
u = earRot.getUpRow();
a = earRot.getFwdRow();
-// llinfos << "Sending listener position " << mListenerPosition << llendl;
+ LL_DEBUGS("Voice") << "Sending listener position " << earPosition << LL_ENDL;
stream
<< "<Position>"
@@ -2435,7 +2434,7 @@ void LLVoiceClient::sendPositionalUpdate(void)
// NOTE that the state of "PTT" is the inverse of "local mute".
// (i.e. when PTT is true, we send a mute command with "false", and vice versa)
-// llinfos << "Sending MuteLocalMic command with parameter " << (mPTT?"false":"true") << llendl;
+ LL_DEBUGS("Voice") << "Sending MuteLocalMic command with parameter " << (mPTT?"false":"true") << LL_ENDL;
stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.MuteLocalMic.1\">"
<< "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>"
@@ -2456,7 +2455,7 @@ void LLVoiceClient::sendPositionalUpdate(void)
{
int volume = p->mOnMuteList?0:p->mUserVolume;
- llinfos << "Setting volume for avatar " << p->mAvatarID << " to " << volume << llendl;
+ LL_INFOS("Voice") << "Setting volume for avatar " << p->mAvatarID << " to " << volume << LL_ENDL;
// Send a mute/unumte command for the user (actually "volume for me").
stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Session.SetParticipantVolumeForMe.1\">"
@@ -2473,7 +2472,7 @@ void LLVoiceClient::sendPositionalUpdate(void)
if(mSpeakerMuteDirty)
{
const char *muteval = ((mSpeakerVolume == -100)?"true":"false");
- llinfos << "Setting speaker mute to " << muteval << llendl;
+ LL_INFOS("Voice") << "Setting speaker mute to " << muteval << LL_ENDL;
stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.MuteLocalSpeaker.1\">"
<< "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>"
@@ -2483,7 +2482,7 @@ void LLVoiceClient::sendPositionalUpdate(void)
if(mSpeakerVolumeDirty)
{
- llinfos << "Setting speaker volume to " << mSpeakerVolume << llendl;
+ LL_INFOS("Voice") << "Setting speaker volume to " << mSpeakerVolume << LL_ENDL;
stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.SetLocalSpeakerVolume.1\">"
<< "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>"
@@ -2493,7 +2492,7 @@ void LLVoiceClient::sendPositionalUpdate(void)
if(mMicVolumeDirty)
{
- llinfos << "Setting mic volume to " << mMicVolume << llendl;
+ LL_INFOS("Voice") << "Setting mic volume to " << mMicVolume << LL_ENDL;
stream << "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Connector.SetLocalMicVolume.1\">"
<< "<ConnectorHandle>" << mConnectorHandle << "</ConnectorHandle>"
@@ -2530,7 +2529,7 @@ void LLVoiceClient::sendPositionalUpdate(void)
void LLVoiceClient::buildSetCaptureDevice(std::ostringstream &stream)
{
- llinfos << "Setting input device = \"" << mCaptureDevice << "\"" << llendl;
+ LL_DEBUGS("Voice") << "Setting input device = \"" << mCaptureDevice << "\"" << LL_ENDL;
stream
<< "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetCaptureDevice.1\">"
@@ -2541,7 +2540,7 @@ void LLVoiceClient::buildSetCaptureDevice(std::ostringstream &stream)
void LLVoiceClient::buildSetRenderDevice(std::ostringstream &stream)
{
- llinfos << "Setting output device = \"" << mRenderDevice << "\"" << llendl;
+ LL_DEBUGS("Voice") << "Setting output device = \"" << mRenderDevice << "\"" << LL_ENDL;
stream
<< "<Request requestId=\"" << mCommandCookie++ << "\" action=\"Aux.SetRenderDevice.1\">"
@@ -2557,7 +2556,7 @@ void LLVoiceClient::connectorCreateResponse(int statusCode, std::string &statusS
{
if(statusCode != 0)
{
- llwarns << "Connector.Create response failure: " << statusString << llendl;
+ LL_WARNS("Voice") << "Connector.Create response failure: " << statusString << LL_ENDL;
setState(stateConnectorFailed);
}
else
@@ -2573,19 +2572,19 @@ void LLVoiceClient::connectorCreateResponse(int statusCode, std::string &statusS
void LLVoiceClient::loginResponse(int statusCode, std::string &statusString, std::string &accountHandle)
{
- llinfos << "Account.Login response (" << statusCode << "): " << statusString << llendl;
+ LL_DEBUGS("Voice") << "Account.Login response (" << statusCode << "): " << statusString << LL_ENDL;
// Status code of 20200 means "bad password". We may want to special-case that at some point.
if ( statusCode == 401 )
{
// Login failure which is probably caused by the delay after a user's password being updated.
- llinfos << "Account.Login response failure (" << statusCode << "): " << statusString << llendl;
+ LL_INFOS("Voice") << "Account.Login response failure (" << statusCode << "): " << statusString << LL_ENDL;
setState(stateLoginRetry);
}
else if(statusCode != 0)
{
- llwarns << "Account.Login response failure (" << statusCode << "): " << statusString << llendl;
+ LL_WARNS("Voice") << "Account.Login response failure (" << statusCode << "): " << statusString << LL_ENDL;
setState(stateLoginFailed);
}
else
@@ -2604,7 +2603,7 @@ void LLVoiceClient::channelGetListResponse(int statusCode, std::string &statusSt
{
if(statusCode != 0)
{
- llwarns << "Account.ChannelGetList response failure: " << statusString << llendl;
+ LL_WARNS("Voice") << "Account.ChannelGetList response failure: " << statusString << LL_ENDL;
switchChannel();
}
else
@@ -2614,12 +2613,12 @@ void LLVoiceClient::channelGetListResponse(int statusCode, std::string &statusSt
if(uri.empty())
{
// Lookup failed, can't join a channel for this area.
- llinfos << "failed to map channel name: " << mChannelName << llendl;
+ LL_INFOS("Voice") << "failed to map channel name: " << mChannelName << LL_ENDL;
}
else
{
// We have a sip URL for this area.
- llinfos << "mapped channel " << mChannelName << " to URI "<< uri << llendl;
+ LL_INFOS("Voice") << "mapped channel " << mChannelName << " to URI "<< uri << LL_ENDL;
}
// switchChannel with an empty uri string will do the right thing (leave channel and not rejoin)
@@ -2631,13 +2630,13 @@ void LLVoiceClient::sessionCreateResponse(int statusCode, std::string &statusStr
{
if(statusCode != 0)
{
- llwarns << "Session.Create response failure (" << statusCode << "): " << statusString << llendl;
+ LL_WARNS("Voice") << "Session.Create response failure (" << statusCode << "): " << statusString << LL_ENDL;
// if(statusCode == 1015)
// {
// if(getState() == stateJoiningSession)
// {
// // this happened during a real join. Going to sessionTerminated should cause a retry in appropriate cases.
-// llwarns << "session handle \"" << sessionHandle << "\", mSessionStateEventHandle \"" << mSessionStateEventHandle << "\""<< llendl;
+// LL_WARNS("Voice") << "session handle \"" << sessionHandle << "\", mSessionStateEventHandle \"" << mSessionStateEventHandle << "\""<< LL_ENDL;
// if(!sessionHandle.empty())
// {
// // This session is bad. Terminate it.
@@ -2659,7 +2658,7 @@ void LLVoiceClient::sessionCreateResponse(int statusCode, std::string &statusStr
// else
// {
// // We didn't think we were in the middle of a join. Don't change state.
-// llwarns << "Not in stateJoiningSession, ignoring" << llendl;
+// LL_WARNS("Voice") << "Not in stateJoiningSession, ignoring" << LL_ENDL;
// }
// }
// else
@@ -2671,7 +2670,7 @@ void LLVoiceClient::sessionCreateResponse(int statusCode, std::string &statusStr
}
else
{
- llinfos << "Session.Create response received (success), session handle is " << sessionHandle << llendl;
+ LL_DEBUGS("Voice") << "Session.Create response received (success), session handle is " << sessionHandle << LL_ENDL;
if(getState() == stateJoiningSession)
{
// This is also grabbed in the SessionStateChangeEvent handler, but it might be useful to have it early...
@@ -2689,10 +2688,10 @@ void LLVoiceClient::sessionConnectResponse(int statusCode, std::string &statusSt
{
if(statusCode != 0)
{
- llwarns << "Session.Connect response failure (" << statusCode << "): " << statusString << llendl;
+ LL_WARNS("Voice") << "Session.Connect response failure (" << statusCode << "): " << statusString << LL_ENDL;
// if(statusCode == 1015)
// {
-// llwarns << "terminating existing session" << llendl;
+// LL_WARNS("Voice") << "terminating existing session" << LL_ENDL;
// sessionTerminate();
// }
// else
@@ -2704,7 +2703,7 @@ void LLVoiceClient::sessionConnectResponse(int statusCode, std::string &statusSt
}
else
{
- llinfos << "Session.Connect response received (success)" << llendl;
+ LL_DEBUGS("Voice") << "Session.Connect response received (success)" << LL_ENDL;
}
}
@@ -2712,7 +2711,7 @@ void LLVoiceClient::sessionTerminateResponse(int statusCode, std::string &status
{
if(statusCode != 0)
{
- llwarns << "Session.Terminate response failure: (" << statusCode << "): " << statusString << llendl;
+ LL_WARNS("Voice") << "Session.Terminate response failure: (" << statusCode << "): " << statusString << LL_ENDL;
if(getState() == stateLeavingSession)
{
// This is probably "(404): Server reporting Failure. Not a member of this conference."
@@ -2727,7 +2726,7 @@ void LLVoiceClient::logoutResponse(int statusCode, std::string &statusString)
{
if(statusCode != 0)
{
- llwarns << "Account.Logout response failure: " << statusString << llendl;
+ LL_WARNS("Voice") << "Account.Logout response failure: " << statusString << LL_ENDL;
// MBW -- XXX -- Should this ever fail? do we care if it does?
}
@@ -2741,7 +2740,7 @@ void LLVoiceClient::connectorShutdownResponse(int statusCode, std::string &statu
{
if(statusCode != 0)
{
- llwarns << "Connector.InitiateShutdown response failure: " << statusString << llendl;
+ LL_WARNS("Voice") << "Connector.InitiateShutdown response failure: " << statusString << LL_ENDL;
// MBW -- XXX -- Should this ever fail? do we care if it does?
}
@@ -2765,7 +2764,7 @@ void LLVoiceClient::sessionStateChangeEvent(
switch(state)
{
case 4: // I see this when joining the session
- llinfos << "joined session " << uriString << ", name " << nameString << " handle " << mNextSessionHandle << llendl;
+ LL_INFOS("Voice") << "joined session " << uriString << ", name " << nameString << " handle " << mNextSessionHandle << LL_ENDL;
// Session create succeeded, move forward.
mSessionStateEventHandle = sessionHandle;
@@ -2778,23 +2777,23 @@ void LLVoiceClient::sessionStateChangeEvent(
setState(stateSessionJoined);
//RN: the uriString being returned by vivox here is actually your account uri, not the channel
// you are attempting to join, so ignore it
- //llinfos << "received URI " << uriString << "(previously " << mSessionURI << ")" << llendl;
+ //LL_DEBUGS("Voice") << "received URI " << uriString << "(previously " << mSessionURI << ")" << LL_ENDL;
//mSessionURI = uriString;
}
}
else if(sessionHandle == mNextSessionHandle)
{
-// llinfos << "received URI " << uriString << ", name " << nameString << " for next session (handle " << mNextSessionHandle << ")" << llendl;
+// LL_DEBUGS("Voice") << "received URI " << uriString << ", name " << nameString << " for next session (handle " << mNextSessionHandle << ")" << LL_ENDL;
}
else
{
- llwarns << "joining unknown session handle " << sessionHandle << ", URI " << uriString << ", name " << nameString << llendl;
+ LL_WARNS("Voice") << "joining unknown session handle " << sessionHandle << ", URI " << uriString << ", name " << nameString << LL_ENDL;
// MBW -- XXX -- Should we send a Session.Terminate here?
}
break;
case 5: // I see this when leaving the session
- llinfos << "left session " << uriString << ", name " << nameString << " handle " << mNextSessionHandle << llendl;
+ LL_INFOS("Voice") << "left session " << uriString << ", name " << nameString << " handle " << mNextSessionHandle << LL_ENDL;
// Set the session handle to the empty string. If we get back to stateJoiningSession, we'll want to wait for the new session handle.
if(sessionHandle == mSessionHandle)
@@ -2822,17 +2821,17 @@ void LLVoiceClient::sessionStateChangeEvent(
case stateJoinSessionFailed:
case stateJoinSessionFailedWaiting:
// normal transition
- llinfos << "left session " << sessionHandle << "in state " << state2string(getState()) << llendl;
+ LL_INFOS("Voice") << "left session " << sessionHandle << "in state " << state2string(getState()) << LL_ENDL;
setState(stateSessionTerminated);
break;
case stateSessionTerminated:
// this will happen sometimes -- there are cases where we send the terminate and then go straight to this state.
- llwarns << "left session " << sessionHandle << "in state " << state2string(getState()) << llendl;
+ LL_WARNS("Voice") << "left session " << sessionHandle << "in state " << state2string(getState()) << LL_ENDL;
break;
default:
- llwarns << "unexpected SessionStateChangeEvent (left session) in state " << state2string(getState()) << llendl;
+ LL_WARNS("Voice") << "unexpected SessionStateChangeEvent (left session) in state " << state2string(getState()) << LL_ENDL;
setState(stateSessionTerminated);
break;
}
@@ -2843,14 +2842,14 @@ void LLVoiceClient::sessionStateChangeEvent(
}
else
{
- llinfos << "leaving unknown session handle " << sessionHandle << ", URI " << uriString << ", name " << nameString << llendl;
+ LL_INFOS("Voice") << "leaving unknown session handle " << sessionHandle << ", URI " << uriString << ", name " << nameString << LL_ENDL;
}
mSessionStateEventHandle.clear();
mSessionStateEventURI.clear();
break;
default:
- llwarns << "unknown state: " << state << llendl;
+ LL_WARNS("Voice") << "unknown state: " << state << LL_ENDL;
break;
}
}
@@ -2861,7 +2860,7 @@ void LLVoiceClient::loginStateChangeEvent(
std::string &statusString,
int state)
{
- llinfos << "state is " << state << llendl;
+ LL_DEBUGS("Voice") << "state is " << state << LL_ENDL;
/*
According to Mike S., status codes for this event are:
login_state_logged_out=0,
@@ -2882,7 +2881,8 @@ void LLVoiceClient::loginStateChangeEvent(
break;
default:
-// llwarns << "unknown state: " << state << llendl;
+ //Used to be a commented out warning
+ LL_DEBUGS("Voice") << "unknown state: " << state << LL_ENDL;
break;
}
}
@@ -2894,13 +2894,13 @@ void LLVoiceClient::sessionNewEvent(
std::string &nameString,
std::string &uriString)
{
-// llinfos << "state is " << state << llendl;
+ LL_DEBUGS("Voice") << "state is " << state << LL_ENDL;
switch(state)
{
case 0:
{
- llinfos << "session handle = " << eventSessionHandle << ", name = " << nameString << ", uri = " << uriString << llendl;
+ LL_DEBUGS("Voice") << "session handle = " << eventSessionHandle << ", name = " << nameString << ", uri = " << uriString << LL_ENDL;
LLUUID caller_id;
if(IDFromName(nameString, caller_id))
@@ -2918,13 +2918,13 @@ void LLVoiceClient::sessionNewEvent(
}
else
{
- llwarns << "Could not generate caller id from uri " << uriString << llendl;
+ LL_WARNS("Voice") << "Could not generate caller id from uri " << uriString << LL_ENDL;
}
}
break;
default:
- llwarns << "unknown state: " << state << llendl;
+ LL_WARNS("Voice") << "unknown state: " << state << LL_ENDL;
break;
}
}
@@ -2939,7 +2939,7 @@ void LLVoiceClient::participantStateChangeEvent(
int participantType)
{
participantState *participant = NULL;
- llinfos << "state is " << state << llendl;
+ LL_DEBUGS("Voice") << "state is " << state << LL_ENDL;
switch(state)
{
@@ -2948,8 +2948,8 @@ void LLVoiceClient::participantStateChangeEvent(
if(participant)
{
participant->mName = nameString;
- llinfos << "added participant \"" << participant->mName
- << "\" (" << participant->mAvatarID << ")"<< llendl;
+ LL_DEBUGS("Voice") << "added participant \"" << participant->mName
+ << "\" (" << participant->mAvatarID << ")"<< LL_ENDL;
}
break;
case 9: // I see this when a participant leaves
@@ -2960,7 +2960,7 @@ void LLVoiceClient::participantStateChangeEvent(
}
break;
default:
-// llwarns << "unknown state: " << state << llendl;
+ LL_DEBUGS("Voice") << "unknown state: " << state << LL_ENDL;
break;
}
}
@@ -2990,13 +2990,13 @@ void LLVoiceClient::participantPropertiesEvent(
}
else
{
- llwarns << "unknown participant: " << uriString << llendl;
+ LL_WARNS("Voice") << "unknown participant: " << uriString << LL_ENDL;
}
}
void LLVoiceClient::auxAudioPropertiesEvent(F32 energy)
{
-// llinfos << "got energy " << energy << llendl;
+ LL_DEBUGS("Voice") << "got energy " << energy << LL_ENDL;
mTuningEnergy = energy;
}
@@ -3054,7 +3054,7 @@ LLVoiceClient::participantState *LLVoiceClient::addParticipant(const std::string
}
}
- llinfos << "participant \"" << result->mURI << "\" added." << llendl;
+ LL_DEBUGS("Voice") << "participant \"" << result->mURI << "\" added." << LL_ENDL;
}
return result;
@@ -3080,7 +3080,7 @@ void LLVoiceClient::removeParticipant(LLVoiceClient::participantState *participa
{
participantMap::iterator iter = mParticipantMap.find(participant->mURI);
- llinfos << "participant \"" << participant->mURI << "\" (" << participant->mAvatarID << ") removed." << llendl;
+ LL_DEBUGS("Voice") << "participant \"" << participant->mURI << "\" (" << participant->mAvatarID << ") removed." << LL_ENDL;
mParticipantMap.erase(iter);
delete participant;
@@ -3090,7 +3090,7 @@ void LLVoiceClient::removeParticipant(LLVoiceClient::participantState *participa
void LLVoiceClient::removeAllParticipants()
{
- llinfos << "called" << llendl;
+ LL_DEBUGS("Voice") << "called" << LL_ENDL;
while(!mParticipantMap.empty())
{
@@ -3173,7 +3173,7 @@ void LLVoiceClient::clearChannelMap(void)
void LLVoiceClient::addChannelMapEntry(std::string &name, std::string &uri)
{
-// llinfos << "Adding channel name mapping: " << name << " -> " << uri << llendl;
+ LL_DEBUGS("Voice") << "Adding channel name mapping: " << name << " -> " << uri << LL_ENDL;
mChannelMap.insert(channelMap::value_type(name, uri));
}
@@ -3196,7 +3196,7 @@ void LLVoiceClient::parcelChanged()
if(getState() >= stateLoggedIn)
{
// If the user is logged in, start a channel lookup.
- llinfos << "sending ParcelVoiceInfoRequest (" << mCurrentRegionName << ", " << mCurrentParcelLocalID << ")" << llendl;
+ LL_DEBUGS("Voice") << "sending ParcelVoiceInfoRequest (" << mCurrentRegionName << ", " << mCurrentParcelLocalID << ")" << LL_ENDL;
std::string url = gAgent.getRegion()->getCapability("ParcelVoiceInfoRequest");
LLSD data;
@@ -3208,7 +3208,7 @@ void LLVoiceClient::parcelChanged()
else
{
// The transition to stateLoggedIn needs to kick this off again.
- llinfos << "not logged in yet, deferring" << llendl;
+ LL_INFOS("Voice") << "not logged in yet, deferring" << LL_ENDL;
}
}
@@ -3220,7 +3220,7 @@ void LLVoiceClient::switchChannel(
{
bool needsSwitch = false;
- llinfos << "called in state " << state2string(getState()) << " with uri \"" << uri << "\"" << llendl;
+ LL_DEBUGS("Voice") << "called in state " << state2string(getState()) << " with uri \"" << uri << "\"" << LL_ENDL;
switch(getState())
{
@@ -3259,12 +3259,12 @@ void LLVoiceClient::switchChannel(
if(uri.empty())
{
// Leave any channel we may be in
- llinfos << "leaving channel" << llendl;
+ LL_DEBUGS("Voice") << "leaving channel" << LL_ENDL;
notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_VOICE_DISABLED);
}
else
{
- llinfos << "switching to channel " << uri << llendl;
+ LL_DEBUGS("Voice") << "switching to channel " << uri << LL_ENDL;
}
if(getState() <= stateNoChannel)
@@ -3313,12 +3313,12 @@ void LLVoiceClient::setSpatialChannel(
mSpatialSessionURI = uri;
mAreaVoiceDisabled = mSpatialSessionURI.empty();
- llinfos << "got spatial channel uri: \"" << uri << "\"" << llendl;
+ LL_DEBUGS("Voice") << "got spatial channel uri: \"" << uri << "\"" << LL_ENDL;
if(mNonSpatialChannel || !mNextSessionSpatial)
{
// User is in a non-spatial chat or joining a non-spatial chat. Don't switch channels.
- llinfos << "in non-spatial chat, not switching channels" << llendl;
+ LL_INFOS("Voice") << "in non-spatial chat, not switching channels" << LL_ENDL;
}
else
{
@@ -3560,7 +3560,7 @@ void LLVoiceClient::leaveChannel(void)
{
if(getState() == stateRunning)
{
-// llinfos << "leaving channel for teleport/logout" << llendl;
+ LL_DEBUGS("Voice") << "leaving channel for teleport/logout" << LL_ENDL;
mChannelName.clear();
sessionTerminate();
}
@@ -3669,7 +3669,7 @@ void LLVoiceClient::setEarLocation(S32 loc)
{
if(mEarLocation != loc)
{
- llinfos << "Setting mEarLocation to " << loc << llendl;
+ LL_DEBUGS("Voice") << "Setting mEarLocation to " << loc << LL_ENDL;
mEarLocation = loc;
mSpatialCoordsDirty = true;
@@ -3678,7 +3678,7 @@ void LLVoiceClient::setEarLocation(S32 loc)
void LLVoiceClient::setVoiceVolume(F32 volume)
{
-// llinfos << "volume is " << volume << llendl;
+ LL_DEBUGS("Voice") << "volume is " << volume << LL_ENDL;
// incoming volume has the range [0.0 ... 1.0], with 0.5 as the default.
// Map it as follows: 0.0 -> -100, 0.5 -> 24, 1.0 -> 50
@@ -3727,7 +3727,7 @@ void LLVoiceClient::setVivoxDebugServerName(std::string &serverName)
void LLVoiceClient::keyDown(KEY key, MASK mask)
{
-// llinfos << "key is " << LLKeyboard::stringFromKey(key) << llendl;
+ LL_DEBUGS("Voice") << "key is " << LLKeyboard::stringFromKey(key) << LL_ENDL;
if (gKeyboard->getKeyRepeated(key))
{
@@ -4021,7 +4021,7 @@ void LLVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::EStatusTy
mVivoxErrorStatusCode = 0;
}
- llinfos << " " << LLVoiceClientStatusObserver::status2string(status) << ", session URI " << mSessionURI << llendl;
+ LL_DEBUGS("Voice") << " " << LLVoiceClientStatusObserver::status2string(status) << ", session URI " << mSessionURI << LL_ENDL;
for (status_observer_set_t::iterator it = mStatusObservers.begin();
it != mStatusObservers.end();
diff --git a/indra/newview/llwatchdog.cpp b/indra/newview/llwatchdog.cpp
new file mode 100644
index 0000000000..ff34fd27be
--- /dev/null
+++ b/indra/newview/llwatchdog.cpp
@@ -0,0 +1,193 @@
+/**
+ * @file llthreadwatchdog.cpp
+ * @brief The LLThreadWatchdog class definitions
+ *
+ * $LicenseInfo:firstyear=2007&license=viewergpl$
+ *
+ * Copyright (c) 2007, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlife.com/developers/opensource/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at http://secondlife.com/developers/opensource/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+
+#include "llviewerprecompiledheaders.h"
+#include "llwatchdog.h"
+
+// This class runs the watchdog timing thread.
+class LLWatchdogTimerThread : public LLThread
+{
+public:
+ LLWatchdogTimerThread() :
+ LLThread("Watchdog"),
+ mSleepMsecs(0),
+ mStopping(false)
+ {
+ }
+
+ ~LLWatchdogTimerThread() {}
+
+ void setSleepTime(long ms) { mSleepMsecs = ms; }
+ void stop()
+ {
+ mStopping = true;
+ ms_sleep(1);
+ }
+
+ /* virtual */ void run()
+ {
+ while(!mStopping)
+ {
+ LLWatchdog::getInstance()->run();
+ ms_sleep(mSleepMsecs);
+ }
+ }
+
+private:
+ long mSleepMsecs;
+ bool mStopping;
+};
+
+// LLWatchdogEntry
+LLWatchdogEntry::LLWatchdogEntry()
+{
+}
+
+LLWatchdogEntry::~LLWatchdogEntry()
+{
+}
+
+void LLWatchdogEntry::start()
+{
+ LLWatchdog::getInstance()->add(this);
+}
+
+void LLWatchdogEntry::stop()
+{
+ LLWatchdog::getInstance()->remove(this);
+}
+
+// LLWatchdogTimeout
+LLWatchdogTimeout::LLWatchdogTimeout() :
+ mTimeout(0.0f)
+{
+}
+
+LLWatchdogTimeout::~LLWatchdogTimeout()
+{
+}
+
+bool LLWatchdogTimeout::isAlive() const
+{
+ return (mTimer.getStarted() && !mTimer.hasExpired());
+}
+
+void LLWatchdogTimeout::setTimeout(F32 d)
+{
+ mTimeout = d;
+}
+
+void LLWatchdogTimeout::start()
+{
+ // Order of operation is very impmortant here.
+ // After LLWatchdogEntry::start() is called
+ // LLWatchdogTimeout::isAlive() will be called asynchronously.
+ mTimer.start();
+ mTimer.setTimerExpirySec(mTimeout);
+ LLWatchdogEntry::start();
+}
+void LLWatchdogTimeout::stop()
+{
+ LLWatchdogEntry::stop();
+ mTimer.stop();
+}
+
+void LLWatchdogTimeout::ping()
+{
+ mTimer.setTimerExpirySec(mTimeout);
+}
+
+// LlWatchdog
+LLWatchdog::LLWatchdog() :
+ mSuspectsAccessMutex(NULL),
+ mTimer(NULL)
+{
+}
+
+LLWatchdog::~LLWatchdog()
+{
+}
+
+void LLWatchdog::add(LLWatchdogEntry* e)
+{
+ mSuspectsAccessMutex->lock();
+ mSuspects.insert(e);
+ mSuspectsAccessMutex->unlock();
+}
+
+void LLWatchdog::remove(LLWatchdogEntry* e)
+{
+ mSuspectsAccessMutex->lock();
+ mSuspects.erase(e);
+ mSuspectsAccessMutex->unlock();
+}
+
+void LLWatchdog::init()
+{
+ mSuspectsAccessMutex = new LLMutex(NULL);
+ mTimer = new LLWatchdogTimerThread();
+ mTimer->setSleepTime(1000);
+ mTimer->start();
+}
+
+void LLWatchdog::cleanup()
+{
+ mTimer->stop();
+ delete mTimer;
+ delete mSuspectsAccessMutex;
+}
+
+void LLWatchdog::run()
+{
+ mSuspectsAccessMutex->lock();
+
+ SuspectsRegistry::iterator result =
+ std::find_if(mSuspects.begin(),
+ mSuspects.end(),
+ std::not1(std::mem_fun(&LLWatchdogEntry::isAlive))
+ );
+
+ if(result != mSuspects.end())
+ {
+ // error!!!
+ mTimer->stop();
+
+ llinfos << "Watchdog detected error:" << llendl;
+#ifdef LL_WINDOWS
+ RaiseException(0,0,0,0);
+#else
+ raise(SIGQUIT);
+#endif
+ }
+
+ mSuspectsAccessMutex->unlock();
+}
diff --git a/indra/newview/llwatchdog.h b/indra/newview/llwatchdog.h
new file mode 100644
index 0000000000..0d897ca4c9
--- /dev/null
+++ b/indra/newview/llwatchdog.h
@@ -0,0 +1,95 @@
+/**
+ * @file llthreadwatchdog.h
+ * @brief The LLThreadWatchdog class declaration
+ *
+ * $LicenseInfo:firstyear=2007&license=viewergpl$
+ *
+ * Copyright (c) 2007, Linden Research, Inc.
+ *
+ * Second Life Viewer Source Code
+ * The source code in this file ("Source Code") is provided by Linden Lab
+ * to you under the terms of the GNU General Public License, version 2.0
+ * ("GPL"), unless you have obtained a separate licensing agreement
+ * ("Other License"), formally executed by you and Linden Lab. Terms of
+ * the GPL can be found in doc/GPL-license.txt in this distribution, or
+ * online at http://secondlife.com/developers/opensource/gplv2
+ *
+ * There are special exceptions to the terms and conditions of the GPL as
+ * it is applied to this Source Code. View the full text of the exception
+ * in the file doc/FLOSS-exception.txt in this software distribution, or
+ * online at http://secondlife.com/developers/opensource/flossexception
+ *
+ * By copying, modifying or distributing this software, you acknowledge
+ * that you have read and understood your obligations described above,
+ * and agree to abide by those obligations.
+ *
+ * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
+ * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
+ * COMPLETENESS OR PERFORMANCE.
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLTHREADWATCHDOG_H
+#define LL_LLTHREADWATCHDOG_H
+
+#ifndef LL_TIMER_H
+ #include "lltimer.h"
+#endif
+
+// LLWatchdogEntry is the interface used by the tasks that
+// need to be watched.
+class LLWatchdogEntry
+{
+public:
+ LLWatchdogEntry();
+ virtual ~LLWatchdogEntry();
+
+ // isAlive is accessed by the watchdog thread.
+ // This may mean that resources used by
+ // isAlive and other method may need synchronization.
+ virtual bool isAlive() const = 0;
+ virtual void start();
+ virtual void stop();
+};
+
+class LLWatchdogTimeout : public LLWatchdogEntry
+{
+public:
+ LLWatchdogTimeout();
+ virtual ~LLWatchdogTimeout();
+
+ /* virtual */ bool isAlive() const;
+ /* virtual */ void start();
+ /* virtual */ void stop();
+
+ void setTimeout(F32 d);
+ void ping();
+
+private:
+ LLTimer mTimer;
+ F32 mTimeout;
+};
+
+class LLWatchdogTimerThread; // Defined in the cpp
+class LLWatchdog : public LLSingleton<LLWatchdog>
+{
+public:
+ LLWatchdog();
+ ~LLWatchdog();
+
+ // Add an entry to the watchdog.
+ void add(LLWatchdogEntry* e);
+ void remove(LLWatchdogEntry* e);
+
+ void init();
+ void run();
+ void cleanup();
+
+private:
+ typedef std::set<LLWatchdogEntry*> SuspectsRegistry;
+ SuspectsRegistry mSuspects;
+ LLMutex* mSuspectsAccessMutex;
+ LLWatchdogTimerThread* mTimer;
+};
+
+#endif // LL_LLTHREADWATCHDOG_H
diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp
index 6cc7e603a6..a6fbe71d67 100644
--- a/indra/newview/llwaterparammanager.cpp
+++ b/indra/newview/llwaterparammanager.cpp
@@ -87,7 +87,7 @@ LLWaterParamManager::~LLWaterParamManager()
void LLWaterParamManager::loadAllPresets(const LLString& file_name)
{
LLString path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/water", ""));
- llinfos << "Loading water settings from " << path_name << llendl;
+ LL_INFOS2("AppInit", "Shaders") << "Loading water settings from " << path_name << LL_ENDL;
//mParamList.clear();
@@ -97,7 +97,7 @@ void LLWaterParamManager::loadAllPresets(const LLString& file_name)
std::string name;
found = gDirUtilp->getNextFileInDir(path_name, "*.xml", name, false);
- llinfos << "name: " << name << llendl;
+ LL_DEBUGS2("AppInit", "Shaders") << "name: " << name << LL_ENDL;
// if we have one
if(found)
@@ -112,7 +112,7 @@ void LLWaterParamManager::loadAllPresets(const LLString& file_name)
std::string water_name = unescaped_name.substr(0, unescaped_name.size() - 4);
LLString cur_path(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/water", name));
- llinfos << "Loading water from " << cur_path << llendl;
+ LL_DEBUGS2("AppInit", "Shaders") << "Loading water from " << cur_path << LL_ENDL;
std::ifstream water_xml(cur_path.c_str());
if (water_xml)
diff --git a/indra/newview/llwindebug.cpp b/indra/newview/llwindebug.cpp
index 7a90be50b8..ca7c0f26a4 100644
--- a/indra/newview/llwindebug.cpp
+++ b/indra/newview/llwindebug.cpp
@@ -35,7 +35,6 @@
#include <tchar.h>
#include <tlhelp32.h>
-#include "llappviewer.h"
#include "llwindebug.h"
#include "llviewercontrol.h"
#include "lldir.h"
@@ -106,6 +105,8 @@ MINIDUMPWRITEDUMP f_mdwp = NULL;
#undef UNICODE
+static LPTOP_LEVEL_EXCEPTION_FILTER gFilterFunc = NULL;
+
HMODULE hDbgHelp;
// Tool Help functions.
@@ -554,14 +555,13 @@ void LLMemoryReserve::release()
static LLMemoryReserve gEmergencyMemoryReserve;
// static
-BOOL LLWinDebug::setupExceptionHandler()
+void LLWinDebug::initExceptionHandler(LPTOP_LEVEL_EXCEPTION_FILTER filter_func)
{
- static BOOL s_first_run = TRUE;
+ static bool s_first_run = true;
// Load the dbghelp dll now, instead of waiting for the crash.
// Less potential for stack mangling
- BOOL ok = TRUE;
if (s_first_run)
{
// First, try loading from the directory that the app resides in.
@@ -576,15 +576,7 @@ BOOL LLWinDebug::setupExceptionHandler()
if (!hDll)
{
- llwarns << "Couldn't find dbghelp.dll!" << llendl;
-
- std::string msg = "Couldn't find dbghelp.dll at ";
- msg += local_dll_name;
- msg += "!\n";
-
- //write_debug(msg.c_str());
-
- ok = FALSE;
+ LL_WARNS("AppInit") << "Couldn't find dbghelp.dll!" << LL_ENDL;
}
else
{
@@ -592,18 +584,15 @@ BOOL LLWinDebug::setupExceptionHandler()
if (!f_mdwp)
{
- //write_debug("No MiniDumpWriteDump!\n");
FreeLibrary(hDll);
hDll = NULL;
- ok = FALSE;
}
}
gEmergencyMemoryReserve.reserve();
- }
- LPTOP_LEVEL_EXCEPTION_FILTER prev_filter;
- prev_filter = SetUnhandledExceptionFilter(LLWinDebug::handleException);
+ s_first_run = false;
+ }
// Try to get Tool Help library functions.
HMODULE hKernel32;
@@ -612,26 +601,44 @@ BOOL LLWinDebug::setupExceptionHandler()
Module32First_ = (MODULE32_FIRST)GetProcAddress(hKernel32, "Module32FirstW");
Module32Next_ = (MODULE32_NEST)GetProcAddress(hKernel32, "Module32NextW");
- if (s_first_run)
+ LPTOP_LEVEL_EXCEPTION_FILTER prev_filter;
+ prev_filter = SetUnhandledExceptionFilter(filter_func);
+
+ if(prev_filter != gFilterFunc)
{
- // We're fine, this is the first run.
- s_first_run = FALSE;
- return ok;
+ LL_WARNS("AppInit")
+ << "Replacing unknown exception (" << (void *)prev_filter << ") with (" << (void *)filter_func << ") !" << LL_ENDL;
}
- if (!prev_filter)
+
+ gFilterFunc = filter_func;
+}
+
+bool LLWinDebug::checkExceptionHandler()
+{
+ bool ok = true;
+ LPTOP_LEVEL_EXCEPTION_FILTER prev_filter;
+ prev_filter = SetUnhandledExceptionFilter(gFilterFunc);
+
+ if (prev_filter != gFilterFunc)
{
- llwarns << "Our exception handler (" << (void *)LLWinDebug::handleException << ") replaced with NULL!" << llendl;
- ok = FALSE;
+ LL_WARNS("AppInit") << "Our exception handler (" << (void *)gFilterFunc << ") replaced with " << prev_filter << "!" << LL_ENDL;
+ ok = false;
}
- if (prev_filter != LLWinDebug::handleException)
+
+ if (prev_filter == NULL)
{
- llwarns << "Our exception handler (" << (void *)LLWinDebug::handleException << ") replaced with " << prev_filter << "!" << llendl;
ok = FALSE;
+ if (gFilterFunc == NULL)
+ {
+ LL_WARNS("AppInit") << "Exception handler uninitialized." << LL_ENDL;
+ }
+ else
+ {
+ LL_WARNS("AppInit") << "Our exception handler (" << (void *)gFilterFunc << ") replaced with NULL!" << LL_ENDL;
+ }
}
return ok;
- // Internal builds don't mess with exception handling.
- //return TRUE;
}
void LLWinDebug::writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const char *filename)
@@ -644,7 +651,7 @@ void LLWinDebug::writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMAT
else
{
std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
- filename);
+ filename);
HANDLE hFile = CreateFileA(dump_path.c_str(),
GENERIC_WRITE,
@@ -672,20 +679,26 @@ void LLWinDebug::writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMAT
}
// static
-LONG LLWinDebug::handleException(struct _EXCEPTION_POINTERS *exception_infop)
+void LLWinDebug::generateCrashStacks(struct _EXCEPTION_POINTERS *exception_infop)
{
- // *NOTE:Mani - This method is no longer the initial exception handler.
- // It is called from viewer_windows_exception_handler() and other places.
+ // *NOTE:Mani - This method is no longer the exception handler.
+ // Its called from viewer_windows_exception_handler() and other places.
//
// Let go of a bunch of reserved memory to give library calls etc
// a chance to execute normally in the case that we ran out of
// memory.
//
- gEmergencyMemoryReserve.release();
+ LLSD info;
+ std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
+ "SecondLifeException");
+ std::string log_path = dump_path + ".log";
if (exception_infop)
{
+ // Since there is exception info... Release the hounds.
+ gEmergencyMemoryReserve.release();
+
if(gSavedSettings.getControl("SaveMinidump") != NULL && gSavedSettings.getBOOL("SaveMinidump"))
{
_MINIDUMP_EXCEPTION_INFORMATION ExInfo;
@@ -698,67 +711,34 @@ LONG LLWinDebug::handleException(struct _EXCEPTION_POINTERS *exception_infop)
writeDumpToFile((MINIDUMP_TYPE)(MiniDumpWithDataSegs | MiniDumpWithIndirectlyReferencedMemory), &ExInfo, "SecondLifePlus.dmp");
}
-
- std::string dump_path = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
- "SecondLifeException");
-
- std::string log_path = dump_path + ".log";
-
- LLSD info;
info = Get_Exception_Info(exception_infop);
+ }
+ LLSD threads;
+ std::vector<DWORD> thread_ids;
+ GetProcessThreadIDs(GetCurrentProcessId(), thread_ids);
- LLSD threads;
- std::vector<DWORD> thread_ids;
- GetProcessThreadIDs(GetCurrentProcessId(), thread_ids);
-
- for(std::vector<DWORD>::iterator th_itr = thread_ids.begin();
- th_itr != thread_ids.end();
- ++th_itr)
+ for(std::vector<DWORD>::iterator th_itr = thread_ids.begin();
+ th_itr != thread_ids.end();
+ ++th_itr)
+ {
+ LLSD thread_info;
+ if(*th_itr != GetCurrentThreadId())
{
- LLSD thread_info;
- if(*th_itr != GetCurrentThreadId())
- {
- GetThreadCallStack(*th_itr, thread_info);
- }
-
- if(thread_info)
- {
-
- threads[llformat("ID %d", *th_itr)] = thread_info;
- }
+ GetThreadCallStack(*th_itr, thread_info);
}
+ if(thread_info)
+ {
+ threads[llformat("ID %d", *th_itr)] = thread_info;
+ }
+ }
- info["Threads"] = threads;
-
- if (info)
- {
- std::ofstream out_file(log_path.c_str());
- LLSDSerialize::toPrettyXML(info, out_file);
- out_file.close();
- }
- }
- else
- {
- // We're calling this due to a network error, not due to an actual exception.
- // It doesn't realy matter what we return.
- return EXCEPTION_CONTINUE_SEARCH;
- }
-
- //handle viewer crash must be called here since
- //we don't return handling of the application
- //back to the process.
- LLAppViewer::handleViewerCrash();
+ info["Threads"] = threads;
- //
- // At this point, we always want to exit the app. There's no graceful
- // recovery for an unhandled exception.
- //
- // Just kill the process.
- LONG retval = EXCEPTION_EXECUTE_HANDLER;
-
- return retval;
+ std::ofstream out_file(log_path.c_str());
+ LLSDSerialize::toPrettyXML(info, out_file);
+ out_file.close();
}
#endif
diff --git a/indra/newview/llwindebug.h b/indra/newview/llwindebug.h
index bb1f11df67..f7543597cc 100644
--- a/indra/newview/llwindebug.h
+++ b/indra/newview/llwindebug.h
@@ -38,10 +38,36 @@
class LLWinDebug
{
public:
- static BOOL setupExceptionHandler();
- static LONG WINAPI handleException(struct _EXCEPTION_POINTERS *pExceptionInfo);
+
+ /**
+ * @brief initialize the llwindebug exception filter callback
+ *
+ * Hand a windows unhandled exception filter to LLWinDebug
+ * This method should only be called to change the
+ * exception filter used by llwindebug.
+ *
+ * Setting filter_func to NULL will clear any custom filters.
+ **/
+ static void initExceptionHandler(LPTOP_LEVEL_EXCEPTION_FILTER filter_func);
+
+ /**
+ * @brief check the status of the exception filter.
+ *
+ * Resets unhandled exception filter to the filter specified
+ * w/ initExceptionFilter).
+ * Returns false if the exception filter was modified.
+ *
+ * *NOTE:Mani In the past mozlib has been accused of
+ * overriding the exception filter. If the mozlib filter
+ * is required, perhaps we can chain calls from our
+ * filter to mozlib's.
+ **/
+ static bool checkExceptionHandler();
+
+ static void generateCrashStacks(struct _EXCEPTION_POINTERS *pExceptionInfo = NULL);
static void writeDumpToFile(MINIDUMP_TYPE type, MINIDUMP_EXCEPTION_INFORMATION *ExInfop, const char *filename);
+private:
};
#endif // LL_LLWINDEBUG_H
diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp
index ea960b39cd..5fb8990774 100644
--- a/indra/newview/llwlparammanager.cpp
+++ b/indra/newview/llwlparammanager.cpp
@@ -111,7 +111,7 @@ void LLWLParamManager::loadPresets(const LLString& file_name)
if(file_name != "")
{
LLString path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight", file_name));
- llinfos << "Loading WindLight settings from " << path_name << llendl;
+ LL_INFOS2("AppInit", "Shaders") << "Loading WindLight settings from " << path_name << LL_ENDL;
llifstream presetsXML(path_name.c_str());
@@ -137,7 +137,7 @@ void LLWLParamManager::loadPresets(const LLString& file_name)
else
{
LLString path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", ""));
- llinfos << "Loading WindLight settings from " << path_name << llendl;
+ LL_INFOS2("AppInit", "Shaders") << "Loading WindLight settings from " << path_name << LL_ENDL;
//mParamList.clear();
@@ -147,7 +147,7 @@ void LLWLParamManager::loadPresets(const LLString& file_name)
std::string name;
found = gDirUtilp->getNextFileInDir(path_name, "*.xml", name, false);
- llinfos << "name: " << name << llendl;
+ LL_DEBUGS2("AppInit", "Shaders") << "name: " << name << LL_ENDL;
// if we have one
if(found)
@@ -162,7 +162,7 @@ void LLWLParamManager::loadPresets(const LLString& file_name)
std::string sky_name = unescaped_name.substr(0, unescaped_name.size() - 4);
LLString cur_path(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", name));
- llinfos << "Loading sky from " << cur_path << llendl;
+ LL_DEBUGS2("AppInit", "Shaders") << "Loading sky from " << cur_path << LL_ENDL;
std::ifstream sky_xml(cur_path.c_str());
if (sky_xml)
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index e2463adde3..f1e0a6b55f 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -1115,6 +1115,10 @@ void process_region_handshake(LLMessageSystem* msg, void** user_data)
void send_agent_pause()
{
+ // *NOTE:Mani Pausing the mainloop timeout. Otherwise a long modal event may cause
+ // the thread monitor to timeout.
+ LLAppViewer::instance()->stopMainloopTimeout();
+
// Note: used to check for LLWorld initialization before it became a singleton.
// Rather than just remove this check I'm changing it to assure that the message
// system has been initialized. -MG
@@ -1170,6 +1174,8 @@ void send_agent_resume()
// Reset the FPS counter to avoid an invalid fps
LLViewerStats::getInstance()->mFPSStat.start();
+
+ LLAppViewer::instance()->startMainloopTimeout();
}
diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index fc4ede5bab..9f1d8abca7 100644
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -569,10 +569,10 @@ F64 LLXMLRPCTransaction::transferRate()
double rate_bits_per_sec = impl.mTransferInfo.mSpeedDownload * 8.0;
- llinfos << "Buffer size: " << impl.mResponseText.size() << " B" << llendl;
- llinfos << "Transfer size: " << impl.mTransferInfo.mSizeDownload << " B" << llendl;
- llinfos << "Transfer time: " << impl.mTransferInfo.mTotalTime << " s" << llendl;
- llinfos << "Transfer rate: " << rate_bits_per_sec / 1000.0 << " Kb/s" << llendl;
+ LL_INFOS("AppInit") << "Buffer size: " << impl.mResponseText.size() << " B" << LL_ENDL;
+ LL_DEBUGS("AppInit") << "Transfer size: " << impl.mTransferInfo.mSizeDownload << " B" << LL_ENDL;
+ LL_DEBUGS("AppInit") << "Transfer time: " << impl.mTransferInfo.mTotalTime << " s" << LL_ENDL;
+ LL_INFOS("AppInit") << "Transfer rate: " << rate_bits_per_sec / 1000.0 << " Kb/s" << LL_ENDL;
return rate_bits_per_sec;
}