Commits

nat_linden committed cbf3896 Merge

Automated merge with ssh://hg.lindenlab.com/viewer/viewer-2-0/

  • Participants
  • Parent commits 65555c7, 7ca4276

Comments (0)

Files changed (3)

File indra/llvfs/lldir.cpp

 	}
 	else
 	{
-		llerrs << "Invalid name for LLDir::setLindenUserDir" << llendl;
+		llerrs << "Invalid name for LLDir::setLindenUserDir(first='" << first << "', last='" << last << "')" << llendl;
 	}
 
 	dumpCurrentDirectories();	

File indra/newview/app_settings/settings.xml

     <key>QAModeEventHostPort</key>
     <map>
       <key>Comment</key>
-      <string>Enable Testing Features.</string>
+      <string>Port on which lleventhost should listen</string>
+      <key>Persist</key>
+      <integer>0</integer>
+      <key>Type</key>
+      <string>S32</string>
+      <key>Value</key>
+      <integer>-1</integer>
+    </map>
+    <key>QAModeTermCode</key>
+    <map>
+      <key>Comment</key>
+      <string>On LL_ERRS, terminate with this code instead of OS message box</string>
       <key>Persist</key>
       <integer>0</integer>
       <key>Type</key>

File indra/newview/llappviewer.cpp

 	
 	if (!initConfiguration())
 		return false;
-	
+
+	// Although initLogging() is the right place to mess with
+	// setFatalFunction(), we can't query gSavedSettings until after
+	// initConfiguration().
+	S32 rc(gSavedSettings.getS32("QAModeTermCode"));
+	if (rc >= 0)
+	{
+		// QAModeTermCode set, terminate with that rc on LL_ERRS. Use _exit()
+		// rather than exit() because normal cleanup depends too much on
+		// successful startup!
+		LLError::setFatalFunction(boost::bind(_exit, rc));
+	}
+
     mAlloc.setProfilingEnabled(gSavedSettings.getBOOL("MemProfiling"));
 
     // *NOTE:Mani - LLCurl::initClass is not thread safe. 
 	LLError::initForApplication(
 				gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, ""));
 	LLError::setFatalFunction(errorCallback);
-	
+
 	// Remove the last ".old" log file.
 	std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
 							     "SecondLife.old");