Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
a517d32c
Commit
a517d32c
authored
13 years ago
by
Aaron Stone
Browse files
Options
Downloads
Patches
Plain Diff
STORM-1482 Change the defaults, look in the app_settings dir for configs as well.
parent
f3dd16ac
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/llcrashlogger/llcrashlogger.cpp
+13
-6
13 additions, 6 deletions
indra/llcrashlogger/llcrashlogger.cpp
with
13 additions
and
6 deletions
indra/llcrashlogger/llcrashlogger.cpp
+
13
−
6
View file @
a517d32c
...
@@ -67,7 +67,7 @@ class LLCrashLoggerResponder : public LLHTTPClient::Responder
...
@@ -67,7 +67,7 @@ class LLCrashLoggerResponder : public LLHTTPClient::Responder
};
};
LLCrashLogger
::
LLCrashLogger
()
:
LLCrashLogger
::
LLCrashLogger
()
:
mCrashBehavior
(
CRASH_BEHAVIOR_A
SK
),
mCrashBehavior
(
CRASH_BEHAVIOR_A
LWAYS_SEND
),
mCrashInPreviousExec
(
false
),
mCrashInPreviousExec
(
false
),
mCrashSettings
(
"CrashSettings"
),
mCrashSettings
(
"CrashSettings"
),
mSentCrashLogs
(
false
),
mSentCrashLogs
(
false
),
...
@@ -274,12 +274,19 @@ const char* const CRASH_SETTINGS_FILE = "settings_crash_behavior.xml";
...
@@ -274,12 +274,19 @@ const char* const CRASH_SETTINGS_FILE = "settings_crash_behavior.xml";
S32
LLCrashLogger
::
loadCrashBehaviorSetting
()
S32
LLCrashLogger
::
loadCrashBehaviorSetting
()
{
{
// First check user_settings (in the user's home dir)
std
::
string
filename
=
gDirUtilp
->
getExpandedFilename
(
LL_PATH_USER_SETTINGS
,
CRASH_SETTINGS_FILE
);
std
::
string
filename
=
gDirUtilp
->
getExpandedFilename
(
LL_PATH_USER_SETTINGS
,
CRASH_SETTINGS_FILE
);
if
(
!
mCrashSettings
.
loadFromFile
(
filename
))
{
// Next check app_settings (in the SL program dir)
std
::
string
filename
=
gDirUtilp
->
getExpandedFilename
(
LL_PATH_APP_SETTINGS
,
CRASH_SETTINGS_FILE
);
mCrashSettings
.
loadFromFile
(
filename
);
}
mCrashSettings
.
loadFromFile
(
filename
);
// If we didn't load any files above, this will return the default
S32
value
=
mCrashSettings
.
getS32
(
"CrashSubmitBehavior"
);
S32
value
=
mCrashSettings
.
getS32
(
"CrashSubmitBehavior"
);
// Whatever value we got, make sure it's valid
switch
(
value
)
switch
(
value
)
{
{
case
CRASH_BEHAVIOR_NEVER_SEND
:
case
CRASH_BEHAVIOR_NEVER_SEND
:
...
@@ -391,14 +398,14 @@ bool LLCrashLogger::init()
...
@@ -391,14 +398,14 @@ bool LLCrashLogger::init()
// Set the log file to crashreport.log
// Set the log file to crashreport.log
LLError
::
logToFile
(
log_file
);
LLError
::
logToFile
(
log_file
);
mCrashSettings
.
declareS32
(
"CrashSubmitBehavior"
,
CRASH_BEHAVIOR_A
SK
,
mCrashSettings
.
declareS32
(
"CrashSubmitBehavior"
,
CRASH_BEHAVIOR_A
LWAYS_SEND
,
"Controls behavior when viewer crashes "
"Controls behavior when viewer crashes "
"(0 = ask before sending crash report, "
"(0 = ask before sending crash report, "
"1 = always send crash report, "
"1 = always send crash report, "
"2 = never send crash report)"
);
"2 = never send crash report)"
);
llinfos
<<
"Loading crash behavior setting"
<<
llendl
;
//
llinfos << "Loading crash behavior setting" << llendl;
mCrashBehavior
=
loadCrashBehaviorSetting
();
//
mCrashBehavior = loadCrashBehaviorSetting();
// If user doesn't want to send, bail out
// If user doesn't want to send, bail out
if
(
mCrashBehavior
==
CRASH_BEHAVIOR_NEVER_SEND
)
if
(
mCrashBehavior
==
CRASH_BEHAVIOR_NEVER_SEND
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment