summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2016-01-29 14:11:28 -0800
committerRider Linden <rider@lindenlab.com>2016-01-29 14:11:28 -0800
commitaf47bfff6bfedb1f4c3a767f896759e1f3fcefb4 (patch)
treecde5069d42e284d931f883f0d4fa4addbd8986a5 /indra
parent83a62fa2e1acdcfdbe19bc327209e0fc09d19a33 (diff)
MAINT-6099: Add a check on the result of requestPostWithLLSD for error. Also log the failed URL.
Diffstat (limited to 'indra')
-rwxr-xr-xindra/llcrashlogger/llcrashlogger.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/llcrashlogger/llcrashlogger.cpp b/indra/llcrashlogger/llcrashlogger.cpp
index f240784dc9..ffb1966c72 100755
--- a/indra/llcrashlogger/llcrashlogger.cpp
+++ b/indra/llcrashlogger/llcrashlogger.cpp
@@ -409,9 +409,17 @@ bool LLCrashLogger::runCrashLogPost(std::string host, LLSD data, std::string msg
{
updateApplication(llformat("%s, try %d...", msg.c_str(), i+1));
- LLCoreHttpUtil::requestPostWithLLSD(httpRequest.get(), LLCore::HttpRequest::DEFAULT_POLICY_ID, 0,
+ LLCore::HttpHandle handle = LLCoreHttpUtil::requestPostWithLLSD(httpRequest.get(), LLCore::HttpRequest::DEFAULT_POLICY_ID, 0,
host, data, httpOpts, LLCore::HttpHeaders::ptr_t(), LLCore::HttpHandler::ptr_t(new LLCrashLoggerHandler));
+ if (handle == LLCORE_HTTP_HANDLE_INVALID)
+ {
+ LLCore::HttpStatus status = httpRequest->getStatus();
+ LL_WARNS("CRASHREPORT") << "Request POST failed to " << host << " with status of [" <<
+ status.getType() << "]\"" << status.toString() << "\"" << LL_ENDL;
+ return false;
+ }
+
while(!gBreak)
{
updateApplication(); // No new message, just pump the IO