Commits

Scott Lawrence  committed 26ac776 Merge

merge changes for storm-1842

  • Participants
  • Parent commits 3142ebd, 996b9b0

Comments (0)

Files changed (3)

File doc/contributions.txt

 	STORM-1799
 	STORM-1796
 	STORM-1807
+	STORM-1842
 	STORM-1808
 	STORM-1809
 	STORM-1793
 	VWR-24017
 	VWR-25588
 	STORM-1790
+	STORM-1842
 Zipherius Turas
 	VWR-76
 	VWR-77

File indra/newview/llappviewer.cpp

 	mPurgeOnExit(false),
 	mSecondInstance(false),
 	mSavedFinalSnapshot(false),
+	mSavePerAccountSettings(false),		// don't save settings on logout unless login succeeded.
 	mForceGraphicsDetail(false),
 	mQuitRequested(false),
 	mLogoutRequestSent(false),
 	{
 		llinfos << "Not saving per-account settings; don't know the account name yet." << llendl;
 	}
+	// Only save per account settings if the previous login succeeded, otherwise
+	// we might end up with a cleared out settings file in case a previous login
+	// failed after loading per account settings.
+	else if (!mSavePerAccountSettings)
+	{
+		llinfos << "Not saving per-account settings; last login was not successful." << llendl;
+	}
 	else
 	{
 		gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE);
 	mOnLoginCompleted();
 
 	writeDebugInfo();
+
+	// we logged in successfully, so save settings on logout
+	llinfos << "Login successful, per account settings will be saved on log out." << llendl;
+	mSavePerAccountSettings=true;
 }
 
 // *TODO - generalize this and move DSO wrangling to a helper class -brad

File indra/newview/llappviewer.h

     bool mPurgeOnExit;
 
 	bool mSavedFinalSnapshot;
+	bool mSavePerAccountSettings;		// only save per account settings if login succeeded
 
 	bool mForceGraphicsDetail;