Merge branch 'master' of git://github.com/AlericInglewood/SingularityViewer
Conflicts: indra/newview/llspeakers.cpp Compile fixes: indra/newview/llgroupmgr.cpp - uncomment new API for GroupBanDataResponder
This commit is contained in:
@@ -192,13 +192,13 @@ public:
|
||||
: mAgentIDs(agent_ids)
|
||||
{ }
|
||||
|
||||
/*virtual*/ void result(const LLSD& content)
|
||||
/*virtual*/ void httpSuccess(void)
|
||||
{
|
||||
// Pull expiration out of headers if available
|
||||
F64 expires = LLAvatarNameCache::nameExpirationFromHeaders(mReceivedHeaders);
|
||||
F64 now = LLFrameTimer::getTotalSeconds();
|
||||
|
||||
LLSD agents = content["agents"];
|
||||
LLSD agents = mContent["agents"];
|
||||
LLSD::array_const_iterator it = agents.beginArray();
|
||||
for ( ; it != agents.endArray(); ++it)
|
||||
{
|
||||
@@ -228,7 +228,7 @@ public:
|
||||
}
|
||||
|
||||
// Same logic as error response case
|
||||
LLSD unresolved_agents = content["bad_ids"];
|
||||
LLSD unresolved_agents = mContent["bad_ids"];
|
||||
S32 num_unresolved = unresolved_agents.size();
|
||||
if (num_unresolved > 0)
|
||||
{
|
||||
@@ -252,13 +252,13 @@ public:
|
||||
<< LL_ENDL;
|
||||
}
|
||||
|
||||
/*virtual*/ void error(U32 status, const std::string& reason)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
// If there's an error, it might be caused by PeopleApi,
|
||||
// or when loading textures on startup and using a very slow
|
||||
// network, this query may time out.
|
||||
// What we should do depends on whether or not we have a cached name
|
||||
LL_WARNS("AvNameCache") << "LLAvatarNameResponder::error " << status << " " << reason
|
||||
LL_WARNS("AvNameCache") << "LLAvatarNameResponder::httpFailure " << mStatus << " " << mReason
|
||||
<< LL_ENDL;
|
||||
|
||||
// Add dummy records for any agent IDs in this request that we do not have cached already
|
||||
|
||||
@@ -312,36 +312,36 @@ AIHTTPTimeoutPolicy const& LLHTTPClient::ResponderBase::getHTTPTimeoutPolicy(voi
|
||||
return AIHTTPTimeoutPolicy::getDebugSettingsCurlTimeout();
|
||||
}
|
||||
|
||||
void LLHTTPClient::ResponderBase::decode_llsd_body(U32 status, std::string const& reason, LLChannelDescriptors const& channels, buffer_ptr_t const& buffer, LLSD& content)
|
||||
void LLHTTPClient::ResponderBase::decode_llsd_body(LLChannelDescriptors const& channels, buffer_ptr_t const& buffer)
|
||||
{
|
||||
AICurlInterface::Stats::llsd_body_count++;
|
||||
if (is_internal_http_error(status))
|
||||
if (is_internal_http_error(mStatus))
|
||||
{
|
||||
// In case of an internal error (ie, a curl error), a description of the (curl) error is the best we can do.
|
||||
// In any case, the body if anything was received at all, can not be relied upon.
|
||||
content = reason;
|
||||
mContent = mReason;
|
||||
return;
|
||||
}
|
||||
// If the status indicates success (and we get here) then we expect the body to be LLSD.
|
||||
bool const should_be_llsd = (200 <= status && status < 300);
|
||||
bool const should_be_llsd = isGoodStatus(mStatus);
|
||||
if (should_be_llsd)
|
||||
{
|
||||
LLBufferStream istr(channels, buffer.get());
|
||||
if (LLSDSerialize::fromXML(content, istr) == LLSDParser::PARSE_FAILURE)
|
||||
if (LLSDSerialize::fromXML(mContent, istr) == LLSDParser::PARSE_FAILURE)
|
||||
{
|
||||
// Unfortunately we can't show the body of the message... I think this is a pretty serious error
|
||||
// though, so if this ever happens it has to be investigated by making a copy of the buffer
|
||||
// before serializing it, as is done below.
|
||||
llwarns << "Failed to deserialize LLSD. " << mURL << " [" << status << "]: " << reason << llendl;
|
||||
llwarns << "Failed to deserialize LLSD. " << mURL << " [" << mStatus << "]: " << mReason << llendl;
|
||||
AICurlInterface::Stats::llsd_body_parse_error++;
|
||||
}
|
||||
// LLSDSerialize::fromXML destructed buffer, we can't initialize content now.
|
||||
// LLSDSerialize::fromXML destructed buffer, we can't initialize mContent now.
|
||||
return;
|
||||
}
|
||||
// Put the body in content as-is.
|
||||
// Put the body in mContent as-is.
|
||||
std::stringstream ss;
|
||||
buffer->writeChannelTo(ss, channels.in());
|
||||
content = ss.str();
|
||||
mContent = ss.str();
|
||||
#ifdef SHOW_ASSERT
|
||||
if (!should_be_llsd)
|
||||
{
|
||||
@@ -357,7 +357,7 @@ void LLHTTPClient::ResponderBase::decode_llsd_body(U32 status, std::string const
|
||||
LLSDSerialize::fromXML(dummy, ss) > 0;
|
||||
if (server_sent_llsd_with_http_error)
|
||||
{
|
||||
llwarns << "The server sent us a response with http status " << status << " and LLSD(!) body: \"" << ss.str() << "\"!" << llendl;
|
||||
llwarns << "The server sent us a response with http status " << mStatus << " and LLSD(!) body: \"" << ss.str() << "\"!" << llendl;
|
||||
}
|
||||
// This is not really an error, and it has been known to happen before. It just normally never happens (at the moment)
|
||||
// and therefore warrants an investigation. Linden Lab (or other grids) might start to send error messages
|
||||
@@ -370,14 +370,14 @@ void LLHTTPClient::ResponderBase::decode_llsd_body(U32 status, std::string const
|
||||
#endif
|
||||
}
|
||||
|
||||
void LLHTTPClient::ResponderBase::decode_raw_body(U32 status, std::string const& reason, LLChannelDescriptors const& channels, buffer_ptr_t const& buffer, std::string& content)
|
||||
void LLHTTPClient::ResponderBase::decode_raw_body(LLChannelDescriptors const& channels, buffer_ptr_t const& buffer, std::string& content)
|
||||
{
|
||||
AICurlInterface::Stats::raw_body_count++;
|
||||
if (is_internal_http_error(status))
|
||||
if (is_internal_http_error(mStatus))
|
||||
{
|
||||
// In case of an internal error (ie, a curl error), a description of the (curl) error is the best we can do.
|
||||
// In any case, the body if anything was received at all, can not be relied upon.
|
||||
content = reason;
|
||||
content = mReason;
|
||||
return;
|
||||
}
|
||||
LLMutexLock lock(buffer->getMutex());
|
||||
@@ -409,19 +409,43 @@ std::string const& LLHTTPClient::ResponderBase::get_cookie(std::string const& ke
|
||||
return empty_dummy;
|
||||
}
|
||||
|
||||
std::string LLHTTPClient::ResponderBase::dumpResponse(void) const
|
||||
{
|
||||
std::ostringstream s;
|
||||
s << "[responder:" << getName() << "] "
|
||||
<< "[URL:" << mURL << "] "
|
||||
<< "[status:" << mStatus << "] "
|
||||
<< "[reason:" << mReason << "] ";
|
||||
|
||||
AIHTTPReceivedHeaders::range_type content_type;
|
||||
if (mReceivedHeaders.getValues("content-type", content_type))
|
||||
{
|
||||
for (AIHTTPReceivedHeaders::iterator_type iter = content_type.first; iter != content_type.second; ++iter)
|
||||
{
|
||||
s << "[content-type:" << iter->second << "] ";
|
||||
}
|
||||
}
|
||||
|
||||
if (mContent.isDefined())
|
||||
{
|
||||
s << "[content:" << LLSDOStreamer<LLSDXMLFormatter>(mContent, LLSDFormatter::OPTIONS_PRETTY) << "]";
|
||||
}
|
||||
|
||||
return s.str();
|
||||
}
|
||||
|
||||
// Called with HTML body.
|
||||
// virtual
|
||||
void LLHTTPClient::ResponderWithCompleted::completedRaw(U32 status, std::string const& reason, LLChannelDescriptors const& channels, buffer_ptr_t const& buffer)
|
||||
void LLHTTPClient::ResponderWithCompleted::completedRaw(LLChannelDescriptors const& channels, buffer_ptr_t const& buffer)
|
||||
{
|
||||
LLSD content;
|
||||
decode_llsd_body(status, reason, channels, buffer, content);
|
||||
decode_llsd_body(channels, buffer);
|
||||
|
||||
// Allow derived class to override at this point.
|
||||
completed(status, reason, content);
|
||||
httpCompleted();
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLHTTPClient::ResponderWithCompleted::completed(U32 status, std::string const& reason, LLSD const& content)
|
||||
void LLHTTPClient::ResponderWithCompleted::httpCompleted(void)
|
||||
{
|
||||
// Either completedRaw() or this method must be overridden by the derived class. Hence, we should never get here.
|
||||
llassert_always(false);
|
||||
@@ -431,36 +455,31 @@ void LLHTTPClient::ResponderWithCompleted::completed(U32 status, std::string con
|
||||
void LLHTTPClient::ResponderWithResult::finished(CURLcode code, U32 http_status, std::string const& reason, LLChannelDescriptors const& channels, buffer_ptr_t const& buffer)
|
||||
{
|
||||
mCode = code;
|
||||
mStatus = http_status;
|
||||
mReason = reason;
|
||||
|
||||
LLSD content;
|
||||
decode_llsd_body(http_status, reason, channels, buffer, content);
|
||||
// Fill mContent.
|
||||
decode_llsd_body(channels, buffer);
|
||||
|
||||
// HTTP status good?
|
||||
if (200 <= http_status && http_status < 300)
|
||||
if (isGoodStatus(http_status))
|
||||
{
|
||||
// Allow derived class to override at this point.
|
||||
result(content);
|
||||
httpSuccess();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Allow derived class to override at this point.
|
||||
errorWithContent(http_status, reason, content);
|
||||
httpFailure();
|
||||
}
|
||||
|
||||
mFinished = true;
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLHTTPClient::ResponderWithResult::errorWithContent(U32 status, std::string const& reason, LLSD const&)
|
||||
void LLHTTPClient::ResponderWithResult::httpFailure(void)
|
||||
{
|
||||
// Allow derived class to override at this point.
|
||||
error(status, reason);
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLHTTPClient::ResponderWithResult::error(U32 status, std::string const& reason)
|
||||
{
|
||||
llinfos << mURL << " [" << status << "]: " << reason << llendl;
|
||||
llinfos << mURL << " [" << mStatus << "]: " << mReason << llendl;
|
||||
}
|
||||
|
||||
// Friend functions.
|
||||
@@ -482,22 +501,20 @@ void intrusive_ptr_release(LLHTTPClient::ResponderBase* responder)
|
||||
// Blocking Responders.
|
||||
//
|
||||
|
||||
class BlockingResponder : public LLHTTPClient::LegacyPolledResponder {
|
||||
class BlockingResponder : public LLHTTPClient::ResponderWithCompleted {
|
||||
private:
|
||||
LLCondition mSignal; // Wait condition to wait till mFinished is true.
|
||||
static LLSD LLSD_dummy;
|
||||
static std::string Raw_dummy;
|
||||
|
||||
public:
|
||||
void wait(void); // Blocks until mFinished is true.
|
||||
virtual LLSD const& getLLSD(void) const { llassert(false); return LLSD_dummy; }
|
||||
virtual std::string const& getRaw(void) const { llassert(false); return Raw_dummy; }
|
||||
/*virtual*/ LLSD const& getContent(void) const { llassert(false); return LLHTTPClient::ResponderWithCompleted::getContent(); }
|
||||
|
||||
protected:
|
||||
void wakeup(void); // Call this at the end of completedRaw.
|
||||
};
|
||||
|
||||
LLSD BlockingResponder::LLSD_dummy;
|
||||
std::string BlockingResponder::Raw_dummy;
|
||||
|
||||
void BlockingResponder::wait(void)
|
||||
@@ -532,14 +549,11 @@ void BlockingResponder::wakeup(void)
|
||||
}
|
||||
|
||||
class BlockingLLSDResponder : public BlockingResponder {
|
||||
private:
|
||||
LLSD mResponse;
|
||||
|
||||
protected:
|
||||
/*virtual*/ LLSD const& getLLSD(void) const { llassert(mFinished && mCode == CURLE_OK); return mResponse; }
|
||||
/*virtual*/ void completedRaw(U32 status, std::string const& reason, LLChannelDescriptors const& channels, buffer_ptr_t const& buffer)
|
||||
/*virtual*/ LLSD const& getContent(void) const { llassert(mFinished && mCode == CURLE_OK); return LLHTTPClient::ResponderWithCompleted::getContent(); }
|
||||
/*virtual*/ void completedRaw(LLChannelDescriptors const& channels, buffer_ptr_t const& buffer)
|
||||
{
|
||||
decode_llsd_body(status, reason, channels, buffer, mResponse); // This puts the body asString() in mResponse in case of http error.
|
||||
decode_llsd_body(channels, buffer); // This puts the body asString() in mContent in case of http error.
|
||||
wakeup();
|
||||
}
|
||||
};
|
||||
@@ -550,9 +564,9 @@ private:
|
||||
|
||||
protected:
|
||||
/*virtual*/ std::string const& getRaw(void) const { llassert(mFinished && mCode == CURLE_OK); return mResponse; }
|
||||
/*virtual*/ void completedRaw(U32 status, std::string const& reason, LLChannelDescriptors const& channels, buffer_ptr_t const& buffer)
|
||||
/*virtual*/ void completedRaw(LLChannelDescriptors const& channels, buffer_ptr_t const& buffer)
|
||||
{
|
||||
decode_raw_body(mCode, reason, channels, buffer, mResponse);
|
||||
decode_raw_body(channels, buffer, mResponse);
|
||||
wakeup();
|
||||
}
|
||||
};
|
||||
@@ -632,7 +646,7 @@ static LLSD blocking_request(
|
||||
|
||||
LLSD response = LLSD::emptyMap();
|
||||
CURLcode result = responder->result_code();
|
||||
S32 http_status = responder->http_status();
|
||||
S32 http_status = responder->getStatus();
|
||||
|
||||
bool http_success = http_status >= 200 && http_status < 300;
|
||||
if (result == CURLE_OK && http_success)
|
||||
@@ -643,7 +657,7 @@ static LLSD blocking_request(
|
||||
}
|
||||
else
|
||||
{
|
||||
response["body"] = responder->getLLSD();
|
||||
response["body"] = responder->getContent();
|
||||
}
|
||||
}
|
||||
else if (result == CURLE_OK && !is_internal_http_error(http_status))
|
||||
@@ -665,7 +679,7 @@ static LLSD blocking_request(
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "CURL ERROR BODY: " << responder->getLLSD().asString() << llendl;
|
||||
llwarns << "CURL ERROR BODY: " << responder->getContent().asString() << llendl;
|
||||
}
|
||||
}
|
||||
if (method == HTTP_RAW_GET)
|
||||
@@ -674,12 +688,12 @@ static LLSD blocking_request(
|
||||
}
|
||||
else
|
||||
{
|
||||
response["body"] = responder->getLLSD().asString();
|
||||
response["body"] = responder->getContent().asString();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
response["body"] = responder->reason();
|
||||
response["body"] = responder->getReason();
|
||||
}
|
||||
|
||||
response["status"] = http_status;
|
||||
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
/**
|
||||
* @brief return true if the status code indicates success.
|
||||
*/
|
||||
static bool isGoodStatus(U32 status)
|
||||
static bool isGoodStatus(S32 status)
|
||||
{
|
||||
return((200 <= status) && (status < 300));
|
||||
}
|
||||
@@ -156,11 +156,11 @@ public:
|
||||
ResponderBase(void);
|
||||
virtual ~ResponderBase();
|
||||
|
||||
// Read body from buffer and put it into content. If status indicates success, interpret it as LLSD, otherwise copy it as-is.
|
||||
void decode_llsd_body(U32 status, std::string const& reason, LLChannelDescriptors const& channels, buffer_ptr_t const& buffer, LLSD& content);
|
||||
// Read body from buffer and put it into mContent. If mStatus indicates success, interpret it as LLSD, otherwise copy it as-is.
|
||||
void decode_llsd_body(LLChannelDescriptors const& channels, buffer_ptr_t const& buffer);
|
||||
|
||||
// Read body from buffer and put it into content. Always copy it as-is.
|
||||
void decode_raw_body(U32 status, std::string const& reason, LLChannelDescriptors const& channels, buffer_ptr_t const& buffer, std::string& content);
|
||||
void decode_raw_body(LLChannelDescriptors const& channels, buffer_ptr_t const& buffer, std::string& content);
|
||||
|
||||
protected:
|
||||
// Associated URL, used for debug output.
|
||||
@@ -172,6 +172,15 @@ public:
|
||||
// The curl result code.
|
||||
CURLcode mCode;
|
||||
|
||||
// HTTP status code, if any.
|
||||
S32 mStatus;
|
||||
|
||||
// Reason for error if mStatus is not good.
|
||||
std::string mReason;
|
||||
|
||||
// Content interpreted as LLSD.
|
||||
LLSD mContent;
|
||||
|
||||
// Set when the transaction finished (with or without errors).
|
||||
bool mFinished;
|
||||
|
||||
@@ -184,6 +193,29 @@ public:
|
||||
std::string const& getURL(void) const { return mURL; }
|
||||
CURLcode result_code(void) const { return mCode; }
|
||||
|
||||
protected:
|
||||
// Short cut.
|
||||
void setResult(S32 status, std::string const& reason, LLSD const& content) { mStatus = status; mReason = reason; mContent = content; mFinished = true; }
|
||||
|
||||
// Call these only from the httpSuccess/httpFailure/httpComplete methods of derived classes.
|
||||
|
||||
LLSD const& getContent(void) const { return mContent; }
|
||||
// You can just access mReceivedHeaders directly from derived classes, but added this accessor
|
||||
// for convenience because upstream introduced this method as part of a new API.
|
||||
AIHTTPReceivedHeaders const& getResponseHeaders(void) const
|
||||
{
|
||||
// If this fails then you need to add '/*virtual*/ bool needsHeaders(void) const { return true; }' to the most derived class.
|
||||
llassert(needsHeaders());
|
||||
return mReceivedHeaders;
|
||||
}
|
||||
// Another convenience method to match upstream.
|
||||
std::string dumpResponse(void) const;
|
||||
public:
|
||||
// The next two are public because blocking_request() needs access too.
|
||||
S32 getStatus(void) const { return mStatus; }
|
||||
std::string const& getReason(void) const { return mReason; }
|
||||
|
||||
public:
|
||||
// Called by BufferedCurlEasyRequest::timed_out or BufferedCurlEasyRequest::processOutput.
|
||||
virtual void finished(CURLcode code, U32 http_status, std::string const& reason, LLChannelDescriptors const& channels, buffer_ptr_t const& buffer) = 0;
|
||||
|
||||
@@ -226,7 +258,9 @@ public:
|
||||
// Called when the whole transaction is completed (also the body was received), but before the body is processed.
|
||||
/*virtual*/ void completed_headers(U32 status, std::string const& reason, AITransferInfo* info)
|
||||
{
|
||||
completedHeaders(status, reason, mReceivedHeaders);
|
||||
mStatus = status;
|
||||
mReason = reason;
|
||||
completedHeaders();
|
||||
}
|
||||
|
||||
// Extract cookie 'key' from mReceivedHeaders and return the string 'key=value', or an empty string if key does not exists.
|
||||
@@ -262,7 +296,7 @@ public:
|
||||
protected:
|
||||
// Derived classes can override this to get the HTML headers that were received, when the message is completed.
|
||||
// Only actually called for classes that implement a needsHeaders() that returns true.
|
||||
virtual void completedHeaders(U32 status, std::string const& reason, AIHTTPReceivedHeaders const& headers)
|
||||
virtual void completedHeaders(void)
|
||||
{
|
||||
// The default does nothing.
|
||||
}
|
||||
@@ -289,8 +323,10 @@ public:
|
||||
/*virtual*/ void finished(CURLcode code, U32 http_status, std::string const& reason, LLChannelDescriptors const& channels, buffer_ptr_t const& buffer)
|
||||
{
|
||||
mCode = code;
|
||||
mStatus = http_status;
|
||||
mReason = reason;
|
||||
// Allow classes derived from ResponderHeadersOnly to override completedHeaders.
|
||||
completedHeaders(http_status, reason, mReceivedHeaders);
|
||||
completedHeaders();
|
||||
mFinished = true;
|
||||
}
|
||||
|
||||
@@ -302,10 +338,9 @@ public:
|
||||
// warning when a class accidently tries to override them.
|
||||
enum YOU_MAY_ONLY_OVERRIDE_COMPLETED_HEADERS { };
|
||||
virtual void completedRaw(YOU_MAY_ONLY_OVERRIDE_COMPLETED_HEADERS) { }
|
||||
virtual void completed(YOU_MAY_ONLY_OVERRIDE_COMPLETED_HEADERS) { }
|
||||
virtual void result(YOU_MAY_ONLY_OVERRIDE_COMPLETED_HEADERS) { }
|
||||
virtual void errorWithContent(YOU_MAY_ONLY_OVERRIDE_COMPLETED_HEADERS) { }
|
||||
virtual void error(YOU_MAY_ONLY_OVERRIDE_COMPLETED_HEADERS) { }
|
||||
virtual void httpCompleted(YOU_MAY_ONLY_OVERRIDE_COMPLETED_HEADERS) { }
|
||||
virtual void httpSuccess(YOU_MAY_ONLY_OVERRIDE_COMPLETED_HEADERS) { }
|
||||
virtual void httpFailure(YOU_MAY_ONLY_OVERRIDE_COMPLETED_HEADERS) { }
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -321,9 +356,11 @@ public:
|
||||
/*virtual*/ void finished(CURLcode code, U32 http_status, std::string const& reason, LLChannelDescriptors const& channels, buffer_ptr_t const& buffer)
|
||||
{
|
||||
mCode = code;
|
||||
mStatus = http_status;
|
||||
mReason = reason;
|
||||
// Allow classes derived from ResponderWithCompleted to override completedRaw
|
||||
// (if not they should override completed or be derived from ResponderWithResult instead).
|
||||
completedRaw(http_status, reason, channels, buffer);
|
||||
completedRaw(channels, buffer);
|
||||
mFinished = true;
|
||||
}
|
||||
|
||||
@@ -331,13 +368,17 @@ public:
|
||||
// Events generated by this class.
|
||||
|
||||
// Derived classes can override this to get the raw data of the body of the HTML message that was received.
|
||||
// The default is to interpret the content as LLSD and call completed().
|
||||
virtual void completedRaw(U32 status, std::string const& reason, LLChannelDescriptors const& channels, buffer_ptr_t const& buffer);
|
||||
// The default is to interpret the content as LLSD and call httpCompleted().
|
||||
virtual void completedRaw(LLChannelDescriptors const& channels, buffer_ptr_t const& buffer);
|
||||
|
||||
// ... or, derived classes can override this to get LLSD content when the message is completed.
|
||||
// The default aborts, as it should never be called (can't make it pure virtual though, so
|
||||
// classes that override completedRaw don't need to implement this function, too).
|
||||
virtual void completed(U32 status, std::string const& reason, LLSD const& content);
|
||||
virtual void httpCompleted(void);
|
||||
|
||||
public:
|
||||
// Ugly LL API...
|
||||
void completeResult(S32 status, std::string const& reason, LLSD const& content) { mCode = CURLE_OK; setResult(status, reason, content); httpCompleted(); }
|
||||
|
||||
#ifdef SHOW_ASSERT
|
||||
// Responders derived from this class must override either completedRaw or completed.
|
||||
@@ -345,9 +386,8 @@ public:
|
||||
// Define those functions here with different parameters in order to cause a compile
|
||||
// warning when a class accidently tries to override them.
|
||||
enum YOU_ARE_DERIVING_FROM_THE_WRONG_CLASS { };
|
||||
virtual void result(YOU_ARE_DERIVING_FROM_THE_WRONG_CLASS) { }
|
||||
virtual void errorWithContent(YOU_ARE_DERIVING_FROM_THE_WRONG_CLASS) { }
|
||||
virtual void error(YOU_ARE_DERIVING_FROM_THE_WRONG_CLASS) { }
|
||||
virtual void httpSuccess(YOU_ARE_DERIVING_FROM_THE_WRONG_CLASS) { }
|
||||
virtual void httpFailure(YOU_ARE_DERIVING_FROM_THE_WRONG_CLASS) { }
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -366,22 +406,18 @@ public:
|
||||
// Events generated by this class.
|
||||
|
||||
// Derived classes must override this to receive the content of a body upon success.
|
||||
virtual void result(LLSD const& content) = 0;
|
||||
|
||||
// Derived classes can override this to get informed when a bad HTML status code is received.
|
||||
// The default calls error().
|
||||
virtual void errorWithContent(U32 status, std::string const& reason, LLSD const& content);
|
||||
virtual void httpSuccess(void) = 0;
|
||||
|
||||
// ... or, derived classes can override this to get informed when a bad HTML status code is received.
|
||||
// The default prints the error to llinfos.
|
||||
virtual void error(U32 status, std::string const& reason);
|
||||
virtual void httpFailure(void);
|
||||
|
||||
public:
|
||||
// Called from LLSDMessage::ResponderAdapter::listener.
|
||||
// LLSDMessage::ResponderAdapter is a hack, showing among others by fact that it needs these functions.
|
||||
|
||||
void pubErrorWithContent(CURLcode code, U32 status, std::string const& reason, LLSD const& content) { mCode = code; errorWithContent(status, reason, content); mFinished = true; }
|
||||
void pubResult(LLSD const& content) { mCode = CURLE_OK; result(content); mFinished = true; }
|
||||
void failureResult(U32 status, std::string const& reason, LLSD const& content, CURLcode code = CURLE_OK) { mCode = code; setResult(status, reason, content); httpFailure(); }
|
||||
void successResult(LLSD const& content) { mCode = CURLE_OK; setResult(HTTP_OK, "", content); httpSuccess(); }
|
||||
|
||||
#ifdef SHOW_ASSERT
|
||||
// Responders derived from this class must override result, and either errorWithContent or error.
|
||||
@@ -390,48 +426,16 @@ public:
|
||||
// warning when a class accidently tries to override them.
|
||||
enum YOU_ARE_DERIVING_FROM_THE_WRONG_CLASS { };
|
||||
virtual void completedRaw(YOU_ARE_DERIVING_FROM_THE_WRONG_CLASS) { }
|
||||
virtual void completed(YOU_ARE_DERIVING_FROM_THE_WRONG_CLASS) { }
|
||||
virtual void httpCompleted(YOU_ARE_DERIVING_FROM_THE_WRONG_CLASS) { }
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
* @class LegacyPolledResponder
|
||||
* @brief As ResponderWithCompleted but caches the result for polling.
|
||||
*
|
||||
* This class allows old polling code to poll if the transaction finished
|
||||
* by calling is_finished() (from the main the thread) and then access the
|
||||
* results-- as opposed to immediately digesting the results when any of
|
||||
* the virtual functions are called.
|
||||
*/
|
||||
class LegacyPolledResponder : public ResponderWithCompleted {
|
||||
protected:
|
||||
U32 mStatus;
|
||||
std::string mReason;
|
||||
|
||||
protected:
|
||||
// The responder finished. Do not override this function in derived classes.
|
||||
/*virtual*/ void finished(CURLcode code, U32 http_status, std::string const& reason, LLChannelDescriptors const& channels, buffer_ptr_t const& buffer)
|
||||
{
|
||||
mStatus = http_status;
|
||||
mReason = reason;
|
||||
// Call base class implementation.
|
||||
ResponderWithCompleted::finished(code, http_status, reason, channels, buffer);
|
||||
}
|
||||
|
||||
public:
|
||||
LegacyPolledResponder(void) : mStatus(HTTP_INTERNAL_ERROR_OTHER) { }
|
||||
|
||||
// Accessors.
|
||||
U32 http_status(void) const { return mStatus; }
|
||||
std::string const& reason(void) const { return mReason; }
|
||||
};
|
||||
|
||||
/**
|
||||
* @class ResponderIgnoreBody
|
||||
* @brief Base class for responders that ignore the result body.
|
||||
*/
|
||||
class ResponderIgnoreBody : public ResponderWithResult {
|
||||
void result(LLSD const&) { }
|
||||
void httpSuccess(void) { }
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -99,14 +99,14 @@ void LLSDMessage::EventResponder::setTimeoutPolicy(std::string const& name)
|
||||
mHTTPTimeoutPolicy = AIHTTPTimeoutPolicy::getTimeoutPolicyByName(name);
|
||||
}
|
||||
|
||||
void LLSDMessage::EventResponder::result(const LLSD& data)
|
||||
void LLSDMessage::EventResponder::httpSuccess(void)
|
||||
{
|
||||
// If our caller passed an empty replyPump name, they're not
|
||||
// listening: this is a fire-and-forget message. Don't bother posting
|
||||
// to the pump whose name is "".
|
||||
if (! mReplyPump.empty())
|
||||
{
|
||||
LLSD response(data);
|
||||
LLSD response(mContent);
|
||||
mReqID.stamp(response);
|
||||
mPumps.obtain(mReplyPump).post(response);
|
||||
}
|
||||
@@ -118,7 +118,7 @@ void LLSDMessage::EventResponder::result(const LLSD& data)
|
||||
}
|
||||
}
|
||||
|
||||
void LLSDMessage::EventResponder::errorWithContent(U32 status, const std::string& reason, const LLSD& content)
|
||||
void LLSDMessage::EventResponder::httpFailure(void)
|
||||
{
|
||||
// If our caller passed an empty errorPump name, they're not
|
||||
// listening: "default error handling is acceptable." Only post to an
|
||||
@@ -129,9 +129,9 @@ void LLSDMessage::EventResponder::errorWithContent(U32 status, const std::string
|
||||
info["target"] = mTarget;
|
||||
info["message"] = mMessage;
|
||||
info["code"] = mCode;
|
||||
info["status"] = LLSD::Integer(status);
|
||||
info["reason"] = reason;
|
||||
info["content"] = content;
|
||||
info["status"] = LLSD::Integer(mStatus);
|
||||
info["reason"] = mReason;
|
||||
info["content"] = mContent;
|
||||
mPumps.obtain(mErrorPump).post(info);
|
||||
}
|
||||
else // default error handling
|
||||
@@ -139,8 +139,8 @@ void LLSDMessage::EventResponder::errorWithContent(U32 status, const std::string
|
||||
// convention seems to be to use llinfos, but that seems a bit casual?
|
||||
LL_WARNS("LLSDMessage::EventResponder")
|
||||
<< "'" << mMessage << "' to '" << mTarget
|
||||
<< "' failed with code " << status << ": " << reason << '\n'
|
||||
<< ll_pretty_print_sd(content)
|
||||
<< "' failed with code " << mStatus << ": " << mReason << '\n'
|
||||
<< ll_pretty_print_sd(mContent)
|
||||
<< LL_ENDL;
|
||||
}
|
||||
}
|
||||
@@ -165,15 +165,15 @@ bool LLSDMessage::ResponderAdapter::listener(const LLSD& payload, bool success)
|
||||
LLHTTPClient::ResponderWithResult* responder = dynamic_cast<LLHTTPClient::ResponderWithResult*>(mResponder.get());
|
||||
// If this assertion fails then ResponderAdapter has been used for a ResponderWithCompleted derived class,
|
||||
// which is not allowed because ResponderAdapter can only work for classes derived from Responder that
|
||||
// implement result() and errorWithContent (or just error).
|
||||
// implement httpSuccess() and httpFailure().
|
||||
llassert_always(responder);
|
||||
if (success)
|
||||
{
|
||||
responder->pubResult(payload);
|
||||
responder->successResult(payload);
|
||||
}
|
||||
else
|
||||
{
|
||||
responder->pubErrorWithContent((CURLcode)payload["code"].asInteger(), payload["status"].asInteger(), payload["reason"], payload["content"]);
|
||||
responder->failureResult(payload["status"].asInteger(), payload["reason"], payload["content"], (CURLcode)payload["code"].asInteger());
|
||||
}
|
||||
|
||||
/*---------------- MUST BE LAST STATEMENT BEFORE RETURN ----------------*/
|
||||
|
||||
@@ -156,8 +156,8 @@ private:
|
||||
|
||||
void setTimeoutPolicy(std::string const& name);
|
||||
|
||||
/*virtual*/ void result(const LLSD& data);
|
||||
/*virtual*/ void errorWithContent(U32 status, const std::string& reason, const LLSD& content);
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return *mHTTPTimeoutPolicy; }
|
||||
/*virtual*/ char const* getName(void) const { return "EventResponder"; }
|
||||
|
||||
@@ -116,20 +116,20 @@ namespace
|
||||
{
|
||||
}
|
||||
|
||||
/*virtual*/ void error(U32 status, const std::string& reason)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
// don't spam when agent communication disconnected already
|
||||
if (status != 410)
|
||||
if (mStatus != 410)
|
||||
{
|
||||
LL_WARNS("Messaging") << "error status " << status
|
||||
LL_WARNS("Messaging") << "error status " << mStatus
|
||||
<< " for message " << mMessageName
|
||||
<< " reason " << reason << llendl;
|
||||
<< " reason " << mReason << llendl;
|
||||
}
|
||||
// TODO: Map status in to useful error code.
|
||||
// TODO: Map mStatus in to useful error code.
|
||||
if(NULL != mCallback) mCallback(mCallbackData, LL_ERR_TCP_TIMEOUT);
|
||||
}
|
||||
|
||||
/*virtual*/ void result(const LLSD& content)
|
||||
/*virtual*/ void httpSuccess(void)
|
||||
{
|
||||
if(NULL != mCallback) mCallback(mCallbackData, LL_ERR_NOERR);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,6 @@ if (LINUX)
|
||||
${LLMATH_LIBRARIES}
|
||||
${LLRENDER_LIBRARIES}
|
||||
${LLVFS_LIBRARIES}
|
||||
${LLWINDOW_LIBRARIES}
|
||||
${LLXML_LIBRARIES}
|
||||
${UI_LIBRARIES} # for GTK
|
||||
${SDL_LIBRARY}
|
||||
|
||||
@@ -125,7 +125,9 @@ bool LLWindowSDL::ll_try_gtk_init(void)
|
||||
if (!tried_gtk_init)
|
||||
{
|
||||
tried_gtk_init = TRUE;
|
||||
#if !GLIB_CHECK_VERSION(2, 32, 0)
|
||||
if (!g_thread_supported ()) g_thread_init (NULL);
|
||||
#endif
|
||||
maybe_lock_display();
|
||||
gtk_is_good = gtk_init_check(NULL, NULL);
|
||||
maybe_unlock_display();
|
||||
|
||||
@@ -84,20 +84,20 @@ class LLIamHereVoice : public LLHTTPClient::ResponderWithResult
|
||||
mParent = parentIn;
|
||||
};
|
||||
|
||||
/*virtual*/ void result( const LLSD& content )
|
||||
/*virtual*/ void httpSuccess(void)
|
||||
{
|
||||
if ( mParent )
|
||||
mParent->setSiteIsAlive( true );
|
||||
};
|
||||
|
||||
/*virtual*/ void error( U32 status, const std::string& reason )
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
if ( mParent )
|
||||
{
|
||||
// *HACK: For purposes of this alive check, 302 Found
|
||||
// (aka Moved Temporarily) is considered alive. The web site
|
||||
// redirects this link to a "cache busting" temporary URL. JC
|
||||
bool alive = (status == HTTP_FOUND);
|
||||
bool alive = (mStatus == HTTP_FOUND);
|
||||
mParent->setSiteIsAlive( alive );
|
||||
}
|
||||
};
|
||||
|
||||
@@ -58,8 +58,6 @@ public:
|
||||
EmeraldDicDownloader(lggDicDownloadFloater* spanel, std::string sname);
|
||||
~EmeraldDicDownloader() { }
|
||||
/*virtual*/ void completedRaw(
|
||||
U32 status,
|
||||
const std::string& reason,
|
||||
const LLChannelDescriptors& channels,
|
||||
const buffer_ptr_t& buffer);
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return emeraldDicDownloader_timeout; }
|
||||
@@ -167,9 +165,9 @@ EmeraldDicDownloader::EmeraldDicDownloader(lggDicDownloadFloater* spanel, std::s
|
||||
}
|
||||
|
||||
|
||||
void EmeraldDicDownloader::completedRaw(U32 status, const std::string& reason, const LLChannelDescriptors& channels, const buffer_ptr_t& buffer)
|
||||
void EmeraldDicDownloader::completedRaw(LLChannelDescriptors const& channels, buffer_ptr_t const& buffer)
|
||||
{
|
||||
if (status < 200 || status >= 300)
|
||||
if (!isGoodStatus(mStatus))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -60,34 +60,34 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void error( U32 statusNum, const std::string& reason )
|
||||
void httpFailure(void)
|
||||
{
|
||||
llwarns << "Transport error [status:" << statusNum << "]: " << reason << llendl;
|
||||
llwarns << "Transport error [status:" << mStatus << "]: " << mReason << llendl;
|
||||
clearPendingRequests();
|
||||
|
||||
LLAccountingCostObserver* observer = mObserverHandle.get();
|
||||
if (observer && observer->getTransactionID() == mTransactionID)
|
||||
{
|
||||
observer->setErrorStatus(statusNum, reason);
|
||||
observer->setErrorStatus(mStatus, mReason);
|
||||
}
|
||||
}
|
||||
|
||||
void result( const LLSD& content )
|
||||
void httpSuccess(void)
|
||||
{
|
||||
//Check for error
|
||||
if ( !content.isMap() || content.has("error") )
|
||||
if ( !mContent.isMap() || mContent.has("error") )
|
||||
{
|
||||
llwarns << "Error on fetched data"<< llendl;
|
||||
}
|
||||
else if (content.has("selected"))
|
||||
else if (mContent.has("selected"))
|
||||
{
|
||||
F32 physicsCost = 0.0f;
|
||||
F32 networkCost = 0.0f;
|
||||
F32 simulationCost = 0.0f;
|
||||
|
||||
physicsCost = content["selected"]["physics"].asReal();
|
||||
networkCost = content["selected"]["streaming"].asReal();
|
||||
simulationCost = content["selected"]["simulation"].asReal();
|
||||
physicsCost = mContent["selected"]["physics"].asReal();
|
||||
networkCost = mContent["selected"]["streaming"].asReal();
|
||||
simulationCost = mContent["selected"]["simulation"].asReal();
|
||||
|
||||
SelectionCost selectionCost( /*transactionID,*/ physicsCost, networkCost, simulationCost );
|
||||
|
||||
|
||||
@@ -2587,8 +2587,8 @@ public:
|
||||
LLMaturityPreferencesResponder(LLAgent *pAgent, U8 pPreferredMaturity, U8 pPreviousMaturity);
|
||||
virtual ~LLMaturityPreferencesResponder();
|
||||
|
||||
/*virtual*/ void result(const LLSD &pContent);
|
||||
/*virtual*/ void error(U32 pStatus, const std::string& pReason);
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return maturityPreferences_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "LLMaturityPreferencesResponder"; }
|
||||
@@ -2612,25 +2612,25 @@ LLMaturityPreferencesResponder::~LLMaturityPreferencesResponder()
|
||||
{
|
||||
}
|
||||
|
||||
void LLMaturityPreferencesResponder::result(const LLSD &pContent)
|
||||
void LLMaturityPreferencesResponder::httpSuccess(void)
|
||||
{
|
||||
U8 actualMaturity = parseMaturityFromServerResponse(pContent);
|
||||
U8 actualMaturity = parseMaturityFromServerResponse(mContent);
|
||||
|
||||
if (actualMaturity != mPreferredMaturity)
|
||||
{
|
||||
llwarns << "while attempting to change maturity preference from '" << LLViewerRegion::accessToString(mPreviousMaturity)
|
||||
<< "' to '" << LLViewerRegion::accessToString(mPreferredMaturity) << "', the server responded with '"
|
||||
<< LLViewerRegion::accessToString(actualMaturity) << "' [value:" << static_cast<U32>(actualMaturity) << ", llsd:"
|
||||
<< pContent << "]" << llendl;
|
||||
<< mContent << "]" << llendl;
|
||||
}
|
||||
mAgent->handlePreferredMaturityResult(actualMaturity);
|
||||
}
|
||||
|
||||
void LLMaturityPreferencesResponder::error(U32 pStatus, const std::string& pReason)
|
||||
void LLMaturityPreferencesResponder::httpFailure(void)
|
||||
{
|
||||
llwarns << "while attempting to change maturity preference from '" << LLViewerRegion::accessToString(mPreviousMaturity)
|
||||
<< "' to '" << LLViewerRegion::accessToString(mPreferredMaturity) << "', we got an error because '"
|
||||
<< pReason << "' [status:" << pStatus << "]" << llendl;
|
||||
<< mReason << "' [status:" << mStatus << "]" << llendl;
|
||||
mAgent->handlePreferredMaturityError();
|
||||
}
|
||||
|
||||
@@ -2820,7 +2820,7 @@ void LLAgent::sendMaturityPreferenceToServer(U8 pPreferredMaturity)
|
||||
// If we don't have a region, report it as an error
|
||||
if (getRegion() == NULL)
|
||||
{
|
||||
responderPtr->error(0U, "region is not defined");
|
||||
responderPtr->failureResult(0U, "region is not defined", LLSD());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2830,7 +2830,7 @@ void LLAgent::sendMaturityPreferenceToServer(U8 pPreferredMaturity)
|
||||
// If the capability is not defined, report it as an error
|
||||
if (url.empty())
|
||||
{
|
||||
responderPtr->error(0U, "capability 'UpdateAgentInformation' is not defined for region");
|
||||
responderPtr->failureResult(0U, "capability 'UpdateAgentInformation' is not defined for region", LLSD());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -3506,10 +3506,10 @@ public:
|
||||
}
|
||||
|
||||
// Successful completion.
|
||||
/* virtual */ void result(const LLSD& content)
|
||||
/* virtual */ void httpSuccess(void)
|
||||
{
|
||||
LL_DEBUGS("Avatar") << "content: " << ll_pretty_print_sd(content) << LL_ENDL;
|
||||
if (content["success"].asBoolean())
|
||||
LL_DEBUGS("Avatar") << "content: " << ll_pretty_print_sd(mContent) << LL_ENDL;
|
||||
if (mContent["success"].asBoolean())
|
||||
{
|
||||
LL_DEBUGS("Avatar") << "OK" << LL_ENDL;
|
||||
}
|
||||
@@ -3520,11 +3520,10 @@ public:
|
||||
}
|
||||
|
||||
// Error
|
||||
/*virtual*/ void errorWithContent(U32 status, const std::string& reason, const LLSD& content)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
llwarns << "appearance update request failed, status: " << status << " reason: " << reason << " code: " << content["code"].asInteger() << " error: \"" << content["error"].asString() << "\"" << llendl;
|
||||
LL_DEBUGS("Avatar") << "content: " << ll_pretty_print_sd(content) << LL_ENDL;
|
||||
onFailure(status);
|
||||
llwarns << "appearance update request failed, " << dumpResponse() << llendl;
|
||||
onFailure(mStatus);
|
||||
}
|
||||
|
||||
void onFailure(U32 status)
|
||||
@@ -4465,7 +4464,9 @@ public:
|
||||
LLFolderType::FT_CLOTHING,
|
||||
"Quick Appearance");
|
||||
LLSD::UUID folder_uuid = query_map["folder_id"].asUUID();
|
||||
if ( gInventory.getCategory( folder_uuid ) != NULL )
|
||||
if ( gInventory.getCategory( folder_uuid ) != NULL &&
|
||||
folder_uuid != gInventory.getRootFolderID() &&
|
||||
folder_uuid != gInventory.getLibraryRootFolderID() )
|
||||
{
|
||||
LLAppearanceMgr::getInstance()->wearInventoryCategory(category, true, false);
|
||||
|
||||
|
||||
@@ -133,11 +133,13 @@ LLAppViewerLinux::~LLAppViewerLinux()
|
||||
|
||||
bool LLAppViewerLinux::init()
|
||||
{
|
||||
#if !GLIB_CHECK_VERSION(2, 32, 0)
|
||||
// g_thread_init() must be called before *any* use of glib, *and*
|
||||
// before any mutexes are held, *and* some of our third-party
|
||||
// libraries likes to use glib functions; in short, do this here
|
||||
// really early in app startup!
|
||||
if (!g_thread_supported ()) g_thread_init (NULL);
|
||||
#endif
|
||||
|
||||
bool success = LLAppViewer::init();
|
||||
|
||||
@@ -277,7 +279,9 @@ bool LLAppViewerLinux::initSLURLHandler()
|
||||
return false; // failed
|
||||
}
|
||||
|
||||
#if !GLIB_CHECK_VERSION(2, 36, 0)
|
||||
g_type_init();
|
||||
#endif
|
||||
|
||||
//ViewerAppAPI *api_server = (ViewerAppAPI*)
|
||||
g_object_new(viewerappapi_get_type(), NULL);
|
||||
@@ -297,7 +301,9 @@ bool LLAppViewerLinux::sendURLToOtherInstance(const std::string& url)
|
||||
DBusGConnection *bus;
|
||||
GError *error = NULL;
|
||||
|
||||
#if !GLIB_CHECK_VERSION(2, 36, 0)
|
||||
g_type_init();
|
||||
#endif
|
||||
|
||||
bus = lldbus_g_bus_get (DBUS_BUS_SESSION, &error);
|
||||
if (bus)
|
||||
|
||||
@@ -75,10 +75,10 @@ public:
|
||||
delete mData;
|
||||
}
|
||||
|
||||
/*virtual*/ void error(U32 statusNum, const std::string& reason)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
llwarns << "Error: " << reason << llendl;
|
||||
LLUpdateTaskInventoryResponder::error(statusNum, reason);
|
||||
llwarns << "Error: " << mReason << llendl;
|
||||
LLUpdateTaskInventoryResponder::httpFailure();
|
||||
LLAssetUploadQueue *queue = mSupplier->get();
|
||||
if (queue)
|
||||
{
|
||||
@@ -86,15 +86,15 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/*virtual*/ void result(const LLSD& content)
|
||||
/*virtual*/ void httpSuccess(void)
|
||||
{
|
||||
LLUpdateTaskInventoryResponder::result(content);
|
||||
LLUpdateTaskInventoryResponder::httpSuccess();
|
||||
LLAssetUploadQueue *queue = mSupplier->get();
|
||||
if (queue)
|
||||
{
|
||||
// Responder is reused across 2 phase upload,
|
||||
// so only start next upload after 2nd phase complete.
|
||||
std::string state = content["state"];
|
||||
std::string state = mContent["state"];
|
||||
if(state == "complete")
|
||||
{
|
||||
queue->request(&mSupplier);
|
||||
|
||||
@@ -223,12 +223,12 @@ LLAssetUploadResponder::~LLAssetUploadResponder()
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLAssetUploadResponder::error(U32 statusNum, const std::string& reason)
|
||||
void LLAssetUploadResponder::httpFailure(void)
|
||||
{
|
||||
llinfos << "LLAssetUploadResponder::error " << statusNum
|
||||
<< " reason: " << reason << llendl;
|
||||
llinfos << "LLAssetUploadResponder::error " << mStatus
|
||||
<< " reason: " << mReason << llendl;
|
||||
LLSD args;
|
||||
switch(statusNum)
|
||||
switch(mStatus)
|
||||
{
|
||||
case 400:
|
||||
args["FILE"] = (mFileName.empty() ? mVFileID.asString() : mFileName);
|
||||
@@ -248,15 +248,15 @@ void LLAssetUploadResponder::error(U32 statusNum, const std::string& reason)
|
||||
}
|
||||
|
||||
//virtual
|
||||
void LLAssetUploadResponder::result(const LLSD& content)
|
||||
void LLAssetUploadResponder::httpSuccess(void)
|
||||
{
|
||||
lldebugs << "LLAssetUploadResponder::result from capabilities" << llendl;
|
||||
|
||||
std::string state = content["state"];
|
||||
std::string state = mContent["state"];
|
||||
|
||||
if (state == "upload")
|
||||
{
|
||||
uploadUpload(content);
|
||||
uploadUpload(mContent);
|
||||
}
|
||||
else if (state == "complete")
|
||||
{
|
||||
@@ -264,14 +264,14 @@ void LLAssetUploadResponder::result(const LLSD& content)
|
||||
if (mFileName.empty())
|
||||
{
|
||||
// rename the file in the VFS to the actual asset id
|
||||
// llinfos << "Changing uploaded asset UUID to " << content["new_asset"].asUUID() << llendl;
|
||||
gVFS->renameFile(mVFileID, mAssetType, content["new_asset"].asUUID(), mAssetType);
|
||||
// llinfos << "Changing uploaded asset UUID to " << mContent["new_asset"].asUUID() << llendl;
|
||||
gVFS->renameFile(mVFileID, mAssetType, mContent["new_asset"].asUUID(), mAssetType);
|
||||
}
|
||||
uploadComplete(content);
|
||||
uploadComplete(mContent);
|
||||
}
|
||||
else
|
||||
{
|
||||
uploadFailure(content);
|
||||
uploadFailure(mContent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,13 +332,13 @@ LLNewAgentInventoryResponder::LLNewAgentInventoryResponder(
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLNewAgentInventoryResponder::error(U32 statusNum, const std::string& reason)
|
||||
void LLNewAgentInventoryResponder::httpFailure(void)
|
||||
{
|
||||
if (mCallBack)
|
||||
{
|
||||
(*mCallBack)(false, mUserData);
|
||||
}
|
||||
LLAssetUploadResponder::error(statusNum, reason);
|
||||
LLAssetUploadResponder::httpFailure();
|
||||
//LLImportColladaAssetCache::getInstance()->assetUploaded(mVFileID, LLUUID(), FALSE);
|
||||
}
|
||||
|
||||
@@ -498,9 +498,9 @@ void LLSendTexLayerResponder::uploadComplete(const LLSD& content)
|
||||
}
|
||||
}
|
||||
|
||||
void LLSendTexLayerResponder::error(U32 statusNum, const std::string& reason)
|
||||
void LLSendTexLayerResponder::httpFailure(void)
|
||||
{
|
||||
llinfos << "status: " << statusNum << " reason: " << reason << llendl;
|
||||
llinfos << "status: " << mStatus << " reason: " << mReason << llendl;
|
||||
|
||||
// Invoke the original callback with an error result
|
||||
LLViewerTexLayerSetBuffer::onTextureUploadComplete(LLUUID(), (void*) mBakedUploadData, -1, LL_EXSTAT_NONE);
|
||||
@@ -1020,20 +1020,17 @@ LLNewAgentInventoryVariablePriceResponder::~LLNewAgentInventoryVariablePriceResp
|
||||
delete mImpl;
|
||||
}
|
||||
|
||||
void LLNewAgentInventoryVariablePriceResponder::errorWithContent(
|
||||
U32 statusNum,
|
||||
const std::string& reason,
|
||||
const LLSD& content)
|
||||
void LLNewAgentInventoryVariablePriceResponder::httpFailure(void)
|
||||
{
|
||||
lldebugs
|
||||
<< "LLNewAgentInventoryVariablePrice::error " << statusNum
|
||||
<< " reason: " << reason << llendl;
|
||||
<< "LLNewAgentInventoryVariablePrice::error " << mStatus
|
||||
<< " reason: " << mReason << llendl;
|
||||
|
||||
if ( content.has("error") )
|
||||
if ( mContent.has("error") )
|
||||
{
|
||||
static const std::string _ERROR = "error";
|
||||
|
||||
mImpl->onTransportError(content[_ERROR]);
|
||||
mImpl->onTransportError(mContent[_ERROR]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1041,7 +1038,7 @@ void LLNewAgentInventoryVariablePriceResponder::errorWithContent(
|
||||
}
|
||||
}
|
||||
|
||||
void LLNewAgentInventoryVariablePriceResponder::result(const LLSD& content)
|
||||
void LLNewAgentInventoryVariablePriceResponder::httpSuccess(void)
|
||||
{
|
||||
// Parse out application level errors and the appropriate
|
||||
// responses for them
|
||||
@@ -1056,13 +1053,13 @@ void LLNewAgentInventoryVariablePriceResponder::result(const LLSD& content)
|
||||
static const std::string _RSVP = "rsvp";
|
||||
|
||||
// Check for application level errors
|
||||
if (content.has(_ERROR))
|
||||
if (mContent.has(_ERROR))
|
||||
{
|
||||
onApplicationLevelError(content[_ERROR]);
|
||||
onApplicationLevelError(mContent[_ERROR]);
|
||||
return;
|
||||
}
|
||||
|
||||
std::string state = content[_STATE];
|
||||
std::string state = mContent[_STATE];
|
||||
LLAssetType::EType asset_type = mImpl->getAssetType();
|
||||
|
||||
if (_COMPLETE == state)
|
||||
@@ -1071,11 +1068,11 @@ void LLNewAgentInventoryVariablePriceResponder::result(const LLSD& content)
|
||||
if (mImpl->getFilename().empty())
|
||||
{
|
||||
// rename the file in the VFS to the actual asset id
|
||||
// llinfos << "Changing uploaded asset UUID to " << content["new_asset"].asUUID() << llendl;
|
||||
// llinfos << "Changing uploaded asset UUID to " << mContent["new_asset"].asUUID() << llendl;
|
||||
gVFS->renameFile(
|
||||
mImpl->getVFileID(),
|
||||
asset_type,
|
||||
content["new_asset"].asUUID(),
|
||||
mContent["new_asset"].asUUID(),
|
||||
asset_type);
|
||||
}
|
||||
|
||||
@@ -1086,8 +1083,8 @@ void LLNewAgentInventoryVariablePriceResponder::result(const LLSD& content)
|
||||
mImpl->getFolderID(),
|
||||
mImpl->getItemName(),
|
||||
mImpl->getItemDescription(),
|
||||
content,
|
||||
content[_UPLOAD_PRICE].asInteger());
|
||||
mContent,
|
||||
mContent[_UPLOAD_PRICE].asInteger());
|
||||
|
||||
// TODO* Add bulk (serial) uploading or add
|
||||
// a super class of this that does so
|
||||
@@ -1095,9 +1092,9 @@ void LLNewAgentInventoryVariablePriceResponder::result(const LLSD& content)
|
||||
else if ( _CONFIRM_UPLOAD == state )
|
||||
{
|
||||
showConfirmationDialog(
|
||||
content[_UPLOAD_PRICE].asInteger(),
|
||||
content[_RESOURCE_COST].asInteger(),
|
||||
content[_RSVP].asString());
|
||||
mContent[_UPLOAD_PRICE].asInteger(),
|
||||
mContent[_RESOURCE_COST].asInteger(),
|
||||
mContent[_RSVP].asString());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -61,8 +61,8 @@ public:
|
||||
const std::string& file_name,
|
||||
LLAssetType::EType asset_type);
|
||||
~LLAssetUploadResponder();
|
||||
/*virtual*/ void error(U32 statusNum, const std::string& reason);
|
||||
/*virtual*/ void result(const LLSD& content);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return assetUploadResponder_timeout; }
|
||||
|
||||
virtual void uploadUpload(const LLSD& content);
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
const LLSD& post_data,
|
||||
const std::string& file_name,
|
||||
LLAssetType::EType asset_type);
|
||||
/*virtual*/ void error(U32 statusNum, const std::string& reason);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
virtual void uploadComplete(const LLSD& content);
|
||||
virtual void uploadFailure(const LLSD& content);
|
||||
/*virtual*/ char const* getName(void) const { return "LLNewAgentInventoryResponder"; }
|
||||
@@ -116,11 +116,8 @@ public:
|
||||
const LLSD& inventory_info);
|
||||
virtual ~LLNewAgentInventoryVariablePriceResponder();
|
||||
|
||||
/*virtual*/ void errorWithContent(
|
||||
U32 statusNum,
|
||||
const std::string& reason,
|
||||
const LLSD& content);
|
||||
/*virtual*/ void result(const LLSD& content);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return newAgentInventoryVariablePriceResponder_timeout; }
|
||||
|
||||
virtual void onApplicationLevelError(
|
||||
@@ -148,7 +145,7 @@ public:
|
||||
~LLSendTexLayerResponder();
|
||||
|
||||
/*virtual*/ void uploadComplete(const LLSD& content);
|
||||
/*virtual*/ void error(U32 statusNum, const std::string& reason);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
/*virtual*/ char const* getName(void) const { return "LLSendTexLayerResponder"; }
|
||||
|
||||
LLBakedUploadData * mBakedUploadData;
|
||||
|
||||
@@ -50,14 +50,14 @@ mClassifiedID(classified_id)
|
||||
{
|
||||
}
|
||||
/*virtual*/
|
||||
void LLClassifiedStatsResponder::result(const LLSD& content)
|
||||
void LLClassifiedStatsResponder::httpSuccess(void)
|
||||
{
|
||||
S32 teleport = content["teleport_clicks"].asInteger();
|
||||
S32 map = content["map_clicks"].asInteger();
|
||||
S32 profile = content["profile_clicks"].asInteger();
|
||||
S32 search_teleport = content["search_teleport_clicks"].asInteger();
|
||||
S32 search_map = content["search_map_clicks"].asInteger();
|
||||
S32 search_profile = content["search_profile_clicks"].asInteger();
|
||||
S32 teleport = mContent["teleport_clicks"].asInteger();
|
||||
S32 map = mContent["map_clicks"].asInteger();
|
||||
S32 profile = mContent["profile_clicks"].asInteger();
|
||||
S32 search_teleport = mContent["search_teleport_clicks"].asInteger();
|
||||
S32 search_map = mContent["search_map_clicks"].asInteger();
|
||||
S32 search_profile = mContent["search_profile_clicks"].asInteger();
|
||||
|
||||
LLPanelClassifiedInfo* classified_panelp = (LLPanelClassifiedInfo*)mClassifiedPanelHandle.get();
|
||||
|
||||
@@ -73,10 +73,9 @@ void LLClassifiedStatsResponder::result(const LLSD& content)
|
||||
}
|
||||
|
||||
/*virtual*/
|
||||
void LLClassifiedStatsResponder::error(U32 status, const std::string& reason)
|
||||
void LLClassifiedStatsResponder::httpFailure(void)
|
||||
{
|
||||
llinfos << "LLClassifiedStatsResponder::error("
|
||||
<< status << ": " << reason << ")" << llendl;
|
||||
llinfos << "httpFailure: " << dumpResponse() << llendl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -45,9 +45,9 @@ class LLClassifiedStatsResponder : public LLHTTPClient::ResponderWithResult
|
||||
public:
|
||||
LLClassifiedStatsResponder(LLHandle<LLView> classified_panel_handle, LLUUID classified_id);
|
||||
//If we get back a normal response, handle it here
|
||||
/*virtual*/ void result(const LLSD& content);
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
//If we get back an error (not found, etc...), handle it here
|
||||
/*virtual*/ void error(U32 status, const std::string& reason);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return classifiedStatsResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "LLClassifiedStatsResponder"; }
|
||||
|
||||
|
||||
@@ -56,23 +56,23 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual void error(U32 status, const std::string& reason)
|
||||
virtual void httpFailure(void)
|
||||
{
|
||||
llwarns << "Crash report sending failed: " << reason << llendl;
|
||||
llwarns << "Crash report sending failed: " << mReason << llendl;
|
||||
}
|
||||
|
||||
virtual void result(const LLSD& content)
|
||||
virtual void httpSuccess(void)
|
||||
{
|
||||
std::string msg = "Crash report successfully sent";
|
||||
if (content.has("message"))
|
||||
if (mContent.has("message"))
|
||||
{
|
||||
msg += ": " + content["message"].asString();
|
||||
msg += ": " + mContent["message"].asString();
|
||||
}
|
||||
llinfos << msg << llendl;
|
||||
|
||||
if (content.has("report_id"))
|
||||
if (mContent.has("report_id"))
|
||||
{
|
||||
gSavedSettings.setS32("CrashReportID", content["report_id"].asInteger());
|
||||
gSavedSettings.setS32("CrashReportID", mContent["report_id"].asInteger());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -265,9 +265,9 @@ bool LLCurrencyUIManager::Impl::checkTransaction()
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mResponder->result_code() != CURLE_OK || mResponder->http_status() < 200 || mResponder->http_status() >= 400)
|
||||
if (mResponder->result_code() != CURLE_OK || mResponder->getStatus() < 200 || mResponder->getStatus() >= 400)
|
||||
{
|
||||
setError(mResponder->reason(), mResponder->getURL());
|
||||
setError(mResponder->getReason(), mResponder->getURL());
|
||||
}
|
||||
else {
|
||||
switch (mTransactionType)
|
||||
|
||||
@@ -118,16 +118,16 @@ class LLEstateChangeInfoResponder : public LLHTTPClient::ResponderWithResult
|
||||
public:
|
||||
|
||||
// if we get a normal response, handle it here
|
||||
/*virtual*/ void result(const LLSD& content)
|
||||
/*virtual*/ void httpSuccess(void)
|
||||
{
|
||||
llinfos << "Committed estate info" << llendl;
|
||||
LLEstateInfoModel::instance().notifyCommit();
|
||||
}
|
||||
|
||||
// if we get an error response
|
||||
/*virtual*/ void error(U32 status, const std::string& reason)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
llwarns << "Failed to commit estate info (" << status << "): " << reason << llendl;
|
||||
llwarns << "Failed to commit estate info (" << mStatus << "): " << mReason << llendl;
|
||||
}
|
||||
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return estateChangeInfoResponder_timeout; }
|
||||
|
||||
@@ -73,8 +73,8 @@ namespace
|
||||
|
||||
|
||||
void handleMessage(const LLSD& content);
|
||||
/*virtual*/ void error(U32 status, const std::string& reason);
|
||||
/*virtual*/ void result(const LLSD& content);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
/*virtual*/ bool is_event_poll(void) const { return true; }
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return eventPollResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "LLEventPollResponder"; }
|
||||
@@ -179,13 +179,13 @@ namespace
|
||||
}
|
||||
|
||||
//virtual
|
||||
void LLEventPollResponder::error(U32 status, const std::string& reason)
|
||||
void LLEventPollResponder::httpFailure(void)
|
||||
{
|
||||
if (mDone) return;
|
||||
|
||||
// A HTTP_BAD_GATEWAY (502) error is our standard timeout response
|
||||
// we get this when there are no events.
|
||||
if ( status == HTTP_BAD_GATEWAY )
|
||||
if ( mStatus == HTTP_BAD_GATEWAY )
|
||||
{
|
||||
mErrorCount = 0;
|
||||
makeRequest();
|
||||
@@ -199,12 +199,12 @@ namespace
|
||||
+ mErrorCount * EVENT_POLL_ERROR_RETRY_SECONDS_INC
|
||||
, this);
|
||||
|
||||
llwarns << "Unexpected HTTP error. status: " << status << ", reason: " << reason << llendl;
|
||||
llwarns << "Unexpected HTTP error. status: " << mStatus << ", reason: " << mReason << llendl;
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "LLEventPollResponder::error: <" << mCount << "> got "
|
||||
<< status << ": " << reason
|
||||
<< mStatus << ": " << mReason
|
||||
<< (mDone ? " -- done" : "") << llendl;
|
||||
stop();
|
||||
|
||||
@@ -226,25 +226,25 @@ namespace
|
||||
}
|
||||
|
||||
//virtual
|
||||
void LLEventPollResponder::result(const LLSD& content)
|
||||
void LLEventPollResponder::httpSuccess(void)
|
||||
{
|
||||
lldebugs << "LLEventPollResponder::result <" << mCount << ">"
|
||||
<< (mDone ? " -- done" : "") << ll_pretty_print_sd(content) << llendl;
|
||||
<< (mDone ? " -- done" : "") << ll_pretty_print_sd(mContent) << llendl;
|
||||
|
||||
if (mDone) return;
|
||||
|
||||
mErrorCount = 0;
|
||||
|
||||
if (!content.get("events") ||
|
||||
!content.get("id"))
|
||||
if (!mContent.get("events") ||
|
||||
!mContent.get("id"))
|
||||
{
|
||||
//llwarns << "received event poll with no events or id key" << llendl;
|
||||
makeRequest();
|
||||
return;
|
||||
}
|
||||
|
||||
mAcknowledge = content["id"];
|
||||
LLSD events = content["events"];
|
||||
mAcknowledge = mContent["id"];
|
||||
LLSD events = mContent["events"];
|
||||
|
||||
if(mAcknowledge.isUndefined())
|
||||
{
|
||||
|
||||
@@ -419,24 +419,24 @@ public:
|
||||
|
||||
LLAvatarPickerResponder(const LLUUID& id) : mQueryID(id) { }
|
||||
|
||||
/*virtual*/ void completed(U32 status, const std::string& reason, const LLSD& content)
|
||||
/*virtual*/ void httpCompleted(void)
|
||||
{
|
||||
//std::ostringstream ss;
|
||||
//LLSDSerialize::toPrettyXML(content, ss);
|
||||
//LLSDSerialize::toPrettyXML(mContent, ss);
|
||||
//llinfos << ss.str() << llendl;
|
||||
|
||||
// in case of invalid characters, the avatar picker returns a 400
|
||||
// just set it to process so it displays 'not found'
|
||||
if (isGoodStatus(status) || status == 400)
|
||||
if (isGoodStatus(mStatus) || mStatus == 400)
|
||||
{
|
||||
if (LLFloaterAvatarPicker::instanceExists())
|
||||
{
|
||||
LLFloaterAvatarPicker::getInstance()->processResponse(mQueryID, content);
|
||||
LLFloaterAvatarPicker::getInstance()->processResponse(mQueryID, mContent);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "avatar picker failed " << status << " reason " << reason << llendl;
|
||||
llwarns << "avatar picker failed " << mStatus << " reason " << mReason << llendl;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -863,9 +863,9 @@ bool LLFloaterBuyLandUI::checkTransaction()
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mResponder->result_code() != CURLE_OK || mResponder->http_status() < 200 || mResponder->http_status() >= 400)
|
||||
if (mResponder->result_code() != CURLE_OK || mResponder->getStatus() < 200 || mResponder->getStatus() >= 400)
|
||||
{
|
||||
tellUserError(mResponder->reason(), mResponder->getURL());
|
||||
tellUserError(mResponder->getReason(), mResponder->getURL());
|
||||
}
|
||||
else {
|
||||
switch (mTransactionType)
|
||||
|
||||
@@ -231,7 +231,7 @@ public:
|
||||
private:
|
||||
static std::string sPreviousReason;
|
||||
|
||||
void error(U32 status, const std::string& reason)
|
||||
void httpFailure(void)
|
||||
{
|
||||
// <singu> Prevent 404s from annoying the user all the tme
|
||||
if (status == HTTP_NOT_FOUND)
|
||||
@@ -239,15 +239,15 @@ private:
|
||||
else
|
||||
// </singu>
|
||||
// Do not display the same error more than once in a row
|
||||
if (reason != sPreviousReason)
|
||||
if (mReason != sPreviousReason)
|
||||
{
|
||||
sPreviousReason = reason;
|
||||
sPreviousReason = mReason;
|
||||
LLSD args;
|
||||
args["REASON"] = reason;
|
||||
args["REASON"] = mReason;
|
||||
LLNotificationsUtil::add("DefaultObjectPermissions", args);
|
||||
}
|
||||
}
|
||||
void result(const LLSD& content)
|
||||
void httpSuccess(void)
|
||||
{
|
||||
// Since we have had a successful POST call be sure to display the next error message
|
||||
// even if it is the same as a previous one.
|
||||
|
||||
@@ -258,9 +258,9 @@ public:
|
||||
LLAssetUploadResponder::uploadFailure(content);
|
||||
LLFloaterSnapshot::savePostcardDone(false, mSnapshotIndex);
|
||||
}
|
||||
/*virtual*/ void error(U32 statusNum, const std::string& reason)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
LLAssetUploadResponder::error(statusNum, reason);
|
||||
LLAssetUploadResponder::httpFailure();
|
||||
LLFloaterSnapshot::savePostcardDone(false, mSnapshotIndex);
|
||||
}
|
||||
/*virtual*/ char const* getName(void) const { return "LLSendPostcardResponder"; }
|
||||
|
||||
@@ -73,14 +73,14 @@ namespace
|
||||
const std::string CONSOLE_NOT_SUPPORTED(
|
||||
"This region does not support the simulator console.");
|
||||
|
||||
// This responder handles the initial response. Unless error() is called
|
||||
// This responder handles the initial response. Unless httpFailure() is called
|
||||
// we assume that the simulator has received our request. Error will be
|
||||
// called if this request times out.
|
||||
//
|
||||
class AsyncConsoleResponder : public LLHTTPClient::ResponderIgnoreBody
|
||||
{
|
||||
public:
|
||||
/*virtual*/ void error(U32 status, const std::string& reason) { sConsoleReplySignal(UNABLE_TO_SEND_COMMAND); }
|
||||
/*virtual*/ void httpFailure(void) { sConsoleReplySignal(UNABLE_TO_SEND_COMMAND); }
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return asyncConsoleResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "AsyncConsoleResponder"; }
|
||||
};
|
||||
@@ -92,7 +92,7 @@ namespace
|
||||
{
|
||||
}
|
||||
|
||||
/*virtual*/ void error(U32 status, const std::string& reason)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
if (mOutput)
|
||||
{
|
||||
@@ -102,12 +102,12 @@ namespace
|
||||
}
|
||||
}
|
||||
|
||||
/*virtual*/ void result(const LLSD& content)
|
||||
/*virtual*/ void httpSuccess(void)
|
||||
{
|
||||
if (mOutput)
|
||||
{
|
||||
mOutput->appendText(
|
||||
content.asString() + PROMPT, false, false);
|
||||
mContent.asString() + PROMPT, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2344,7 +2344,7 @@ public:
|
||||
}
|
||||
|
||||
// if we get a normal response, handle it here
|
||||
/*virtual*/ void result(const LLSD& content)
|
||||
/*virtual*/ void httpSuccess(void)
|
||||
{
|
||||
LL_INFOS("Windlight") << "Successfully committed estate info" << llendl;
|
||||
|
||||
@@ -2355,10 +2355,10 @@ public:
|
||||
}
|
||||
|
||||
// if we get an error response
|
||||
/*virtual*/ void error(U32 status, const std::string& reason)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
llinfos << "LLEstateChangeInfoResponder::error [status:"
|
||||
<< status << "]: " << reason << llendl;
|
||||
<< mStatus << "]: " << mReason << llendl;
|
||||
}
|
||||
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return estateChangeInfoResponder_timeout; }
|
||||
|
||||
@@ -723,12 +723,12 @@ class LLUserReportResponder : public LLHTTPClient::ResponderWithResult
|
||||
public:
|
||||
LLUserReportResponder() { }
|
||||
|
||||
/*virtual*/ void error(U32 status, const std::string& reason)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
// *TODO do some user messaging here
|
||||
LLUploadDialog::modalUploadFinished();
|
||||
}
|
||||
/*virtual*/ void result(const LLSD& content)
|
||||
/*virtual*/ void httpSuccess(void)
|
||||
{
|
||||
// we don't care about what the server returns
|
||||
LLUploadDialog::modalUploadFinished();
|
||||
|
||||
@@ -184,27 +184,27 @@ void LLPanelScriptLimitsInfo::updateChild(LLUICtrl* child_ctr)
|
||||
// Responders
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
void fetchScriptLimitsRegionInfoResponder::result(const LLSD& content)
|
||||
void fetchScriptLimitsRegionInfoResponder::httpSuccess(void)
|
||||
{
|
||||
//we don't need to test with a fake response here (shouldn't anyway)
|
||||
|
||||
#ifdef DUMP_REPLIES_TO_LLINFOS
|
||||
|
||||
LLSDNotationStreamer notation_streamer(content);
|
||||
LLSDNotationStreamer notation_streamer(mContent);
|
||||
std::ostringstream nice_llsd;
|
||||
nice_llsd << notation_streamer;
|
||||
|
||||
OSMessageBox(nice_llsd.str(), "main cap response:", 0);
|
||||
|
||||
llinfos << "main cap response:" << content << llendl;
|
||||
llinfos << "main cap response:" << mContent << llendl;
|
||||
|
||||
#endif
|
||||
|
||||
// at this point we have an llsd which should contain ether one or two urls to the services we want.
|
||||
// first we look for the details service:
|
||||
if(content.has("ScriptResourceDetails"))
|
||||
if(mContent.has("ScriptResourceDetails"))
|
||||
{
|
||||
LLHTTPClient::get(content["ScriptResourceDetails"], new fetchScriptLimitsRegionDetailsResponder(mInfo));
|
||||
LLHTTPClient::get(mContent["ScriptResourceDetails"], new fetchScriptLimitsRegionDetailsResponder(mInfo));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -216,18 +216,18 @@ void fetchScriptLimitsRegionInfoResponder::result(const LLSD& content)
|
||||
}
|
||||
|
||||
// then the summary service:
|
||||
if(content.has("ScriptResourceSummary"))
|
||||
if(mContent.has("ScriptResourceSummary"))
|
||||
{
|
||||
LLHTTPClient::get(content["ScriptResourceSummary"], new fetchScriptLimitsRegionSummaryResponder(mInfo));
|
||||
LLHTTPClient::get(mContent["ScriptResourceSummary"], new fetchScriptLimitsRegionSummaryResponder(mInfo));
|
||||
}
|
||||
}
|
||||
|
||||
void fetchScriptLimitsRegionInfoResponder::error(U32 status, const std::string& reason)
|
||||
void fetchScriptLimitsRegionInfoResponder::httpFailure(void)
|
||||
{
|
||||
llwarns << "fetchScriptLimitsRegionInfoResponder error [status:" << status << "]: " << reason << llendl;
|
||||
llwarns << "fetchScriptLimitsRegionInfoResponder error [status:" << mStatus << "]: " << mReason << llendl;
|
||||
}
|
||||
|
||||
void fetchScriptLimitsRegionSummaryResponder::result(const LLSD& content_ref)
|
||||
void fetchScriptLimitsRegionSummaryResponder::httpSuccess(void)
|
||||
{
|
||||
#ifdef USE_FAKE_RESPONSES
|
||||
|
||||
@@ -265,7 +265,7 @@ void fetchScriptLimitsRegionSummaryResponder::result(const LLSD& content_ref)
|
||||
|
||||
#else
|
||||
|
||||
const LLSD& content = content_ref;
|
||||
const LLSD& content = mContent;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -309,12 +309,12 @@ void fetchScriptLimitsRegionSummaryResponder::result(const LLSD& content_ref)
|
||||
}
|
||||
}
|
||||
|
||||
void fetchScriptLimitsRegionSummaryResponder::error(U32 status, const std::string& reason)
|
||||
void fetchScriptLimitsRegionSummaryResponder::httpFailure(void)
|
||||
{
|
||||
llwarns << "fetchScriptLimitsRegionSummaryResponder error [status:" << status << "]: " << reason << llendl;
|
||||
llwarns << "fetchScriptLimitsRegionSummaryResponder error [status:" << mStatus << "]: " << mReason << llendl;
|
||||
}
|
||||
|
||||
void fetchScriptLimitsRegionDetailsResponder::result(const LLSD& content_ref)
|
||||
void fetchScriptLimitsRegionDetailsResponder::httpSuccess(void)
|
||||
{
|
||||
#ifdef USE_FAKE_RESPONSES
|
||||
/*
|
||||
@@ -374,7 +374,7 @@ result (map)
|
||||
|
||||
#else
|
||||
|
||||
const LLSD& content = content_ref;
|
||||
const LLSD& content = mContent;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -418,12 +418,12 @@ result (map)
|
||||
}
|
||||
}
|
||||
|
||||
void fetchScriptLimitsRegionDetailsResponder::error(U32 status, const std::string& reason)
|
||||
void fetchScriptLimitsRegionDetailsResponder::httpFailure(void)
|
||||
{
|
||||
llwarns << "fetchScriptLimitsRegionDetailsResponder error [status:" << status << "]: " << reason << llendl;
|
||||
llwarns << "fetchScriptLimitsRegionDetailsResponder error [status:" << mStatus << "]: " << mReason << llendl;
|
||||
}
|
||||
|
||||
void fetchScriptLimitsAttachmentInfoResponder::result(const LLSD& content_ref)
|
||||
void fetchScriptLimitsAttachmentInfoResponder::httpSuccess(void)
|
||||
{
|
||||
|
||||
#ifdef USE_FAKE_RESPONSES
|
||||
@@ -456,13 +456,13 @@ void fetchScriptLimitsAttachmentInfoResponder::result(const LLSD& content_ref)
|
||||
summary["used"] = used;
|
||||
|
||||
fake_content["summary"] = summary;
|
||||
fake_content["attachments"] = content_ref["attachments"];
|
||||
fake_content["attachments"] = mContent["attachments"];
|
||||
|
||||
const LLSD& content = fake_content;
|
||||
|
||||
#else
|
||||
|
||||
const LLSD& content = content_ref;
|
||||
const LLSD& content = mContent;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -514,9 +514,9 @@ void fetchScriptLimitsAttachmentInfoResponder::result(const LLSD& content_ref)
|
||||
}
|
||||
}
|
||||
|
||||
void fetchScriptLimitsAttachmentInfoResponder::error(U32 status, const std::string& reason)
|
||||
void fetchScriptLimitsAttachmentInfoResponder::httpFailure(void)
|
||||
{
|
||||
llwarns << "fetchScriptLimitsAttachmentInfoResponder error [status:" << status << "]: " << reason << llendl;
|
||||
llwarns << "fetchScriptLimitsAttachmentInfoResponder error [status:" << mStatus << "]: " << mReason << llendl;
|
||||
}
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
@@ -90,8 +90,8 @@ class fetchScriptLimitsRegionInfoResponder: public LLHTTPClient::ResponderWithRe
|
||||
public:
|
||||
fetchScriptLimitsRegionInfoResponder(const LLSD& info) : mInfo(info) {};
|
||||
|
||||
void result(const LLSD& content);
|
||||
void error(U32 status, const std::string& reason);
|
||||
void httpSuccess(void);
|
||||
void httpFailure(void);
|
||||
public:
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return fetchScriptLimitsRegionInfoResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "fetchScriptLimitsRegionInfoResponder"; }
|
||||
@@ -105,8 +105,8 @@ class fetchScriptLimitsRegionSummaryResponder: public LLHTTPClient::ResponderWit
|
||||
public:
|
||||
fetchScriptLimitsRegionSummaryResponder(const LLSD& info) : mInfo(info) {};
|
||||
|
||||
void result(const LLSD& content);
|
||||
void error(U32 status, const std::string& reason);
|
||||
void httpSuccess(void);
|
||||
void httpFailure(void);
|
||||
public:
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return fetchScriptLimitsRegionSummaryResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "fetchScriptLimitsRegionSummaryResponder"; }
|
||||
@@ -120,8 +120,8 @@ class fetchScriptLimitsRegionDetailsResponder: public LLHTTPClient::ResponderWit
|
||||
public:
|
||||
fetchScriptLimitsRegionDetailsResponder(const LLSD& info) : mInfo(info) {};
|
||||
|
||||
void result(const LLSD& content);
|
||||
void error(U32 status, const std::string& reason);
|
||||
void httpSuccess(void);
|
||||
void httpFailure(void);
|
||||
public:
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return fetchScriptLimitsRegionDetailsResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "fetchScriptLimitsRegionDetailsResponder"; }
|
||||
@@ -135,8 +135,8 @@ class fetchScriptLimitsAttachmentInfoResponder: public LLHTTPClient::ResponderWi
|
||||
public:
|
||||
fetchScriptLimitsAttachmentInfoResponder() {};
|
||||
|
||||
void result(const LLSD& content);
|
||||
void error(U32 status, const std::string& reason);
|
||||
void httpSuccess(void);
|
||||
void httpFailure(void);
|
||||
public:
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return fetchScriptLimitsAttachmentInfoResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "fetchScriptLimitsAttachmentInfoResponder"; }
|
||||
|
||||
@@ -112,20 +112,20 @@ class LLIamHere : public LLHTTPClient::ResponderWithResult
|
||||
mParent = parentIn;
|
||||
};
|
||||
|
||||
/*virtual*/ void result( const LLSD& content )
|
||||
/*virtual*/ void httpSuccess(void)
|
||||
{
|
||||
if ( mParent )
|
||||
mParent->setSiteIsAlive( true );
|
||||
};
|
||||
|
||||
/*virtual*/ void error( U32 status, const std::string& reason )
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
if ( mParent )
|
||||
{
|
||||
// *HACK: For purposes of this alive check, 302 Found
|
||||
// (aka Moved Temporarily) is considered alive. The web site
|
||||
// redirects this link to a "cache busting" temporary URL. JC
|
||||
bool alive = (status == HTTP_FOUND);
|
||||
bool alive = (mStatus == HTTP_FOUND);
|
||||
mParent->setSiteIsAlive( alive );
|
||||
}
|
||||
};
|
||||
|
||||
@@ -65,21 +65,21 @@ public:
|
||||
|
||||
LLHandle<LLFloater> mParent;
|
||||
|
||||
/*virtual*/ void completedHeaders(U32 status, std::string const& reason, AIHTTPReceivedHeaders const& headers)
|
||||
/*virtual*/ void completedHeaders(void)
|
||||
{
|
||||
if (200 <= status && status < 300)
|
||||
if (isGoodStatus(mStatus))
|
||||
{
|
||||
std::string media_type;
|
||||
if (headers.getFirstValue("content-type", media_type))
|
||||
if (mReceivedHeaders.getFirstValue("content-type", media_type))
|
||||
{
|
||||
std::string::size_type idx1 = media_type.find_first_of(";");
|
||||
std::string mime_type = media_type.substr(0, idx1);
|
||||
completeAny(status, mime_type);
|
||||
completeAny(mStatus, mime_type);
|
||||
return;
|
||||
}
|
||||
llwarns << "LLMediaTypeResponder::completedHeaders: OK HTTP status (" << status << ") but no Content-Type! Received headers: " << headers << llendl;
|
||||
llwarns << "LLMediaTypeResponder::completedHeaders: OK HTTP status (" << mStatus << ") but no Content-Type! Received headers: " << mReceivedHeaders << llendl;
|
||||
}
|
||||
completeAny(status, "none/none");
|
||||
completeAny(mStatus, "none/none");
|
||||
}
|
||||
|
||||
void completeAny(U32 status, const std::string& mime_type)
|
||||
|
||||
@@ -1962,8 +1962,8 @@ class GroupBanDataResponder : public LLHTTPClient::ResponderWithResult
|
||||
public:
|
||||
GroupBanDataResponder(const LLUUID& gropup_id, BOOL force_refresh=false);
|
||||
virtual ~GroupBanDataResponder() {}
|
||||
virtual void result(const LLSD& mContent); //httpSuccess();
|
||||
virtual void error(U32 mStatus, const std::string& mContent); //httpFailure();
|
||||
virtual void httpSuccess();
|
||||
virtual void httpFailure();
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return groupBanDataResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "GroupBanDataResponder"; }
|
||||
private:
|
||||
@@ -1976,15 +1976,13 @@ GroupBanDataResponder::GroupBanDataResponder(const LLUUID& gropup_id, BOOL force
|
||||
mForceRefresh(force_refresh)
|
||||
{}
|
||||
|
||||
//void GroupBanDataResponder::httpFailure()
|
||||
void GroupBanDataResponder::error(U32 mStatus, const std::string& mContent)
|
||||
void GroupBanDataResponder::httpFailure()
|
||||
{
|
||||
LL_WARNS("GrpMgr") << "Error receiving group member data [status:"
|
||||
<< mStatus << "]: " << mContent << LL_ENDL;
|
||||
}
|
||||
|
||||
//void GroupBanDataResponder::httpSuccess()
|
||||
void GroupBanDataResponder::result(const LLSD& mContent)
|
||||
void GroupBanDataResponder::httpSuccess()
|
||||
{
|
||||
if (mContent.size())
|
||||
{
|
||||
@@ -2102,22 +2100,22 @@ class GroupMemberDataResponder : public LLHTTPClient::ResponderWithResult
|
||||
public:
|
||||
GroupMemberDataResponder() {}
|
||||
virtual ~GroupMemberDataResponder() {}
|
||||
/*virtual*/ void result(const LLSD& pContent);
|
||||
/*virtual*/ void error(U32 pStatus, const std::string& pReason);
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return groupMemberDataResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "GroupMemberDataResponder"; }
|
||||
private:
|
||||
LLSD mMemberData;
|
||||
};
|
||||
|
||||
void GroupMemberDataResponder::error(U32 pStatus, const std::string& pReason)
|
||||
void GroupMemberDataResponder::httpFailure(void)
|
||||
{
|
||||
LL_WARNS("GrpMgr") << "Error receiving group member data." << LL_ENDL;
|
||||
}
|
||||
|
||||
void GroupMemberDataResponder::result(const LLSD& content)
|
||||
void GroupMemberDataResponder::httpSuccess(void)
|
||||
{
|
||||
LLGroupMgr::processCapGroupMembersRequest(content);
|
||||
LLGroupMgr::processCapGroupMembersRequest(mContent);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "llagent.h"
|
||||
#include "llviewerregion.h"
|
||||
|
||||
void LLHomeLocationResponder::result( const LLSD& content )
|
||||
void LLHomeLocationResponder::httpSuccess(void)
|
||||
{
|
||||
LLVector3 agent_pos;
|
||||
bool error = true;
|
||||
@@ -48,48 +48,48 @@ void LLHomeLocationResponder::result( const LLSD& content )
|
||||
|
||||
// was the call to /agent/<agent-id>/home-location successful?
|
||||
// If not, we keep error set to true
|
||||
if( ! content.has("success") )
|
||||
if( ! mContent.has("success") )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if( 0 != strncmp("true", content["success"].asString().c_str(), 4 ) )
|
||||
if( 0 != strncmp("true", mContent["success"].asString().c_str(), 4 ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
// did the simulator return a "justified" home location?
|
||||
// If no, we keep error set to true
|
||||
if( ! content.has( "HomeLocation" ) )
|
||||
if( ! mContent.has( "HomeLocation" ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if( ! content["HomeLocation"].has("LocationPos") )
|
||||
if( ! mContent["HomeLocation"].has("LocationPos") )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if( ! content["HomeLocation"]["LocationPos"].has("X") )
|
||||
if( ! mContent["HomeLocation"]["LocationPos"].has("X") )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
agent_pos.mV[VX] = content["HomeLocation"]["LocationPos"]["X"].asInteger();
|
||||
agent_pos.mV[VX] = mContent["HomeLocation"]["LocationPos"]["X"].asInteger();
|
||||
|
||||
if( ! content["HomeLocation"]["LocationPos"].has("Y") )
|
||||
if( ! mContent["HomeLocation"]["LocationPos"].has("Y") )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
agent_pos.mV[VY] = content["HomeLocation"]["LocationPos"]["Y"].asInteger();
|
||||
agent_pos.mV[VY] = mContent["HomeLocation"]["LocationPos"]["Y"].asInteger();
|
||||
|
||||
if( ! content["HomeLocation"]["LocationPos"].has("Z") )
|
||||
if( ! mContent["HomeLocation"]["LocationPos"].has("Z") )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
agent_pos.mV[VZ] = content["HomeLocation"]["LocationPos"]["Z"].asInteger();
|
||||
agent_pos.mV[VZ] = mContent["HomeLocation"]["LocationPos"]["Z"].asInteger();
|
||||
|
||||
error = false;
|
||||
} while( 0 );
|
||||
@@ -103,8 +103,8 @@ void LLHomeLocationResponder::result( const LLSD& content )
|
||||
}
|
||||
}
|
||||
|
||||
void LLHomeLocationResponder::error( U32 status, const std::string& reason )
|
||||
void LLHomeLocationResponder::httpFailure(void)
|
||||
{
|
||||
llinfos << "received error(" << reason << ")" << llendl;
|
||||
llinfos << "httpFailure: " << dumpResponse() << llendl;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,8 +44,8 @@ extern AIHTTPTimeoutPolicy homeLocationResponder_timeout;
|
||||
/* Typedef, Enum, Class, Struct, etc. */
|
||||
class LLHomeLocationResponder : public LLHTTPClient::ResponderWithResult
|
||||
{
|
||||
/*virtual*/ void result( const LLSD& content );
|
||||
/*virtual*/ void error( U32 status, const std::string& reason );
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return homeLocationResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "LLHomeLocationResponder"; }
|
||||
};
|
||||
|
||||
@@ -172,10 +172,10 @@ public:
|
||||
mAgents = agents_to_invite;
|
||||
}
|
||||
|
||||
/*virtual*/ void error(U32 statusNum, const std::string& reason)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
//try an "old school" way.
|
||||
if ( statusNum == 400 )
|
||||
if ( mStatus == 400 )
|
||||
{
|
||||
start_deprecated_conference_chat(
|
||||
mTempSessionID,
|
||||
@@ -635,10 +635,10 @@ public:
|
||||
mSessionID = session_id;
|
||||
}
|
||||
|
||||
/*virtual*/ void error(U32 statusNum, const std::string& reason)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
llwarns << "Error inviting all agents to session [status:"
|
||||
<< statusNum << "]: " << reason << llendl;
|
||||
<< mStatus << "]: " << mReason << llendl;
|
||||
//throw something back to the viewer here?
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ public:
|
||||
mInvitiationType = invitation_type;
|
||||
}
|
||||
|
||||
/*virtual*/ void result(const LLSD& content)
|
||||
/*virtual*/ void httpSuccess(void)
|
||||
{
|
||||
if ( gIMMgr)
|
||||
{
|
||||
@@ -137,7 +137,7 @@ public:
|
||||
//but unfortunately, our base that we are receiving here
|
||||
//may not be the most up to date. It was accurate at
|
||||
//some point in time though.
|
||||
speaker_mgr->setSpeakers(content);
|
||||
speaker_mgr->setSpeakers(mContent);
|
||||
|
||||
//we now have our base of users in the session
|
||||
//that was accurate at some point, but maybe not now
|
||||
@@ -167,10 +167,10 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/*virtual*/ void error(U32 statusNum, const std::string& reason)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
llwarns << "LLViewerChatterBoxInvitationAcceptResponder error [status:"
|
||||
<< statusNum << "]: " << reason << llendl;
|
||||
<< mStatus << "]: " << mReason << llendl;
|
||||
//throw something back to the viewer here?
|
||||
if ( gIMMgr )
|
||||
{
|
||||
@@ -181,7 +181,7 @@ public:
|
||||
|
||||
if ( floaterp )
|
||||
{
|
||||
if ( 404 == statusNum )
|
||||
if ( 404 == mStatus )
|
||||
{
|
||||
std::string error_string;
|
||||
error_string = "session_does_not_exist_error";
|
||||
|
||||
@@ -541,24 +541,24 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
/*virtual*/ void error(U32 status, const std::string& reason)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
LL_WARNS("InvAPI") << "CreateInventoryCategory failed. status = " << status << ", reasion = \"" << reason << "\"" << LL_ENDL;
|
||||
LL_WARNS("InvAPI") << "CreateInventoryCategory failed. status = " << mStatus << ", reason = \"" << mReason << "\"" << LL_ENDL;
|
||||
}
|
||||
|
||||
/*virtual*/ void result(const LLSD& content)
|
||||
/*virtual*/ void httpSuccess(void)
|
||||
{
|
||||
//Server has created folder.
|
||||
|
||||
LLUUID category_id = content["folder_id"].asUUID();
|
||||
LLUUID category_id = mContent["folder_id"].asUUID();
|
||||
|
||||
|
||||
// Add the category to the internal representation
|
||||
LLPointer<LLViewerInventoryCategory> cat =
|
||||
new LLViewerInventoryCategory( category_id,
|
||||
content["parent_id"].asUUID(),
|
||||
(LLFolderType::EType)content["type"].asInteger(),
|
||||
content["name"].asString(),
|
||||
mContent["parent_id"].asUUID(),
|
||||
(LLFolderType::EType)mContent["type"].asInteger(),
|
||||
mContent["name"].asString(),
|
||||
gAgent.getID() );
|
||||
cat->setVersion(LLViewerInventoryCategory::VERSION_INITIAL);
|
||||
cat->setDescendentCount(0);
|
||||
@@ -568,7 +568,7 @@ public:
|
||||
|
||||
if (mCallback && mData)
|
||||
{
|
||||
mCallback(content, mData);
|
||||
mCallback(mContent, mData);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1469,12 +1469,12 @@ void LLInventoryModel::addChangedMask(U32 mask, const LLUUID& referent)
|
||||
}
|
||||
|
||||
// If we get back a normal response, handle it here
|
||||
void LLInventoryModel::fetchInventoryResponder::result(const LLSD& content)
|
||||
void LLInventoryModel::fetchInventoryResponder::httpSuccess(void)
|
||||
{
|
||||
start_new_inventory_observer();
|
||||
|
||||
/*LLUUID agent_id;
|
||||
agent_id = content["agent_id"].asUUID();
|
||||
agent_id = mContent["agent_id"].asUUID();
|
||||
if(agent_id != gAgent.getID())
|
||||
{
|
||||
llwarns << "Got a inventory update for the wrong agent: " << agent_id
|
||||
@@ -1483,13 +1483,13 @@ void LLInventoryModel::fetchInventoryResponder::result(const LLSD& content)
|
||||
}*/
|
||||
item_array_t items;
|
||||
update_map_t update;
|
||||
S32 count = content["items"].size();
|
||||
S32 count = mContent["items"].size();
|
||||
LLUUID folder_id;
|
||||
// Does this loop ever execute more than once?
|
||||
for(S32 i = 0; i < count; ++i)
|
||||
{
|
||||
LLPointer<LLViewerInventoryItem> titem = new LLViewerInventoryItem;
|
||||
titem->unpackMessage(content["items"][i]);
|
||||
titem->unpackMessage(mContent["items"][i]);
|
||||
|
||||
lldebugs << "LLInventoryModel::messageUpdateCore() item id:"
|
||||
<< titem->getUUID() << llendl;
|
||||
@@ -1529,10 +1529,10 @@ void LLInventoryModel::fetchInventoryResponder::result(const LLSD& content)
|
||||
}
|
||||
|
||||
//If we get back an error (not found, etc...), handle it here
|
||||
void LLInventoryModel::fetchInventoryResponder::error(U32 status, const std::string& reason)
|
||||
void LLInventoryModel::fetchInventoryResponder::httpFailure(void)
|
||||
{
|
||||
llinfos << "fetchInventory::error "
|
||||
<< status << ": " << reason << llendl;
|
||||
<< mStatus << ": " << mReason << llendl;
|
||||
gInventory.notifyObservers();
|
||||
}
|
||||
|
||||
|
||||
@@ -87,8 +87,8 @@ public:
|
||||
{
|
||||
public:
|
||||
fetchInventoryResponder(const LLSD& request_sd) : mRequestSD(request_sd) {};
|
||||
/*virtual*/ void result(const LLSD& content);
|
||||
/*virtual*/ void error(U32 status, const std::string& reason);
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
/*virtual*/ AICapabilityType capability_type(void) const { return cap_inventory; }
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return fetchInventoryResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "fetchInventoryResponder"; }
|
||||
|
||||
@@ -393,21 +393,21 @@ class LLInventoryModelFetchItemResponder : public LLInventoryModel::fetchInvento
|
||||
{
|
||||
public:
|
||||
LLInventoryModelFetchItemResponder(const LLSD& request_sd) : LLInventoryModel::fetchInventoryResponder(request_sd) {};
|
||||
/*virtual*/ void result(const LLSD& content);
|
||||
/*virtual*/ void error(U32 status, const std::string& reason);
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return inventoryModelFetchItemResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "LLInventoryModelFetchItemResponder"; }
|
||||
};
|
||||
|
||||
void LLInventoryModelFetchItemResponder::result( const LLSD& content )
|
||||
void LLInventoryModelFetchItemResponder::httpSuccess(void)
|
||||
{
|
||||
LLInventoryModel::fetchInventoryResponder::result(content);
|
||||
LLInventoryModel::fetchInventoryResponder::httpSuccess();
|
||||
LLInventoryModelBackgroundFetch::instance().incrFetchCount(-1);
|
||||
}
|
||||
|
||||
void LLInventoryModelFetchItemResponder::error( U32 status, const std::string& reason )
|
||||
void LLInventoryModelFetchItemResponder::httpFailure(void)
|
||||
{
|
||||
LLInventoryModel::fetchInventoryResponder::error(status, reason);
|
||||
LLInventoryModel::fetchInventoryResponder::httpFailure();
|
||||
LLInventoryModelBackgroundFetch::instance().incrFetchCount(-1);
|
||||
}
|
||||
|
||||
@@ -418,8 +418,8 @@ class LLInventoryModelFetchDescendentsResponder : public LLHTTPClient::Responder
|
||||
mRequestSD(request_sd),
|
||||
mRecursiveCatUUIDs(recursive_cats)
|
||||
{};
|
||||
/*virtual*/ void result(const LLSD& content);
|
||||
/*virtual*/ void error(U32 status, const std::string& reason);
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
/*virtual*/ AICapabilityType capability_type(void) const { return cap_inventory; }
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return inventoryModelFetchDescendentsResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "LLInventoryModelFetchDescendentsResponder"; }
|
||||
@@ -432,14 +432,14 @@ private:
|
||||
};
|
||||
|
||||
// If we get back a normal response, handle it here.
|
||||
void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content)
|
||||
void LLInventoryModelFetchDescendentsResponder::httpSuccess(void)
|
||||
{
|
||||
LLInventoryModelBackgroundFetch *fetcher = LLInventoryModelBackgroundFetch::getInstance();
|
||||
if (content.has("folders"))
|
||||
if (mContent.has("folders"))
|
||||
{
|
||||
|
||||
for(LLSD::array_const_iterator folder_it = content["folders"].beginArray();
|
||||
folder_it != content["folders"].endArray();
|
||||
for(LLSD::array_const_iterator folder_it = mContent["folders"].beginArray();
|
||||
folder_it != mContent["folders"].endArray();
|
||||
++folder_it)
|
||||
{
|
||||
LLSD folder_sd = *folder_it;
|
||||
@@ -535,10 +535,10 @@ void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content)
|
||||
}
|
||||
}
|
||||
|
||||
if (content.has("bad_folders"))
|
||||
if (mContent.has("bad_folders"))
|
||||
{
|
||||
for(LLSD::array_const_iterator folder_it = content["bad_folders"].beginArray();
|
||||
folder_it != content["bad_folders"].endArray();
|
||||
for(LLSD::array_const_iterator folder_it = mContent["bad_folders"].beginArray();
|
||||
folder_it != mContent["bad_folders"].endArray();
|
||||
++folder_it)
|
||||
{
|
||||
LLSD folder_sd = *folder_it;
|
||||
@@ -561,16 +561,16 @@ void LLInventoryModelFetchDescendentsResponder::result(const LLSD& content)
|
||||
}
|
||||
|
||||
//If we get back an error (not found, etc...), handle it here
|
||||
void LLInventoryModelFetchDescendentsResponder::error(U32 status, const std::string& reason)
|
||||
void LLInventoryModelFetchDescendentsResponder::httpFailure(void)
|
||||
{
|
||||
LLInventoryModelBackgroundFetch *fetcher = LLInventoryModelBackgroundFetch::getInstance();
|
||||
|
||||
llinfos << "LLInventoryModelFetchDescendentsResponder::error "
|
||||
<< status << ": " << reason << llendl;
|
||||
<< mStatus << ": " << mReason << llendl;
|
||||
|
||||
fetcher->incrFetchCount(-1);
|
||||
|
||||
if (is_internal_http_error_that_warrants_a_retry(status)) // timed out
|
||||
if (is_internal_http_error_that_warrants_a_retry(mStatus)) // timed out
|
||||
{
|
||||
for(LLSD::array_const_iterator folder_it = mRequestSD["folders"].beginArray();
|
||||
folder_it != mRequestSD["folders"].endArray();
|
||||
|
||||
@@ -42,11 +42,11 @@
|
||||
#include "llsdserialize.h"
|
||||
|
||||
//virtual
|
||||
void LLMapLayerResponder::result(const LLSD& result)
|
||||
void LLMapLayerResponder::httpSuccess(void)
|
||||
{
|
||||
llinfos << "LLMapLayerResponder::result from capabilities" << llendl;
|
||||
llinfos << "LLMapLayerResponder::mContent from capabilities" << llendl;
|
||||
|
||||
S32 agent_flags = result["AgentData"]["Flags"];
|
||||
S32 agent_flags = mContent["AgentData"]["Flags"];
|
||||
U32 layer = flagsToLayer(agent_flags);
|
||||
|
||||
if (layer != SIM_LAYER_COMPOSITE)
|
||||
@@ -60,7 +60,7 @@ void LLMapLayerResponder::result(const LLSD& result)
|
||||
LLWorldMap::getInstance()->mMapLayers.clear();
|
||||
|
||||
LLSD::array_const_iterator iter;
|
||||
for(iter = result["LayerData"].beginArray(); iter != result["LayerData"].endArray(); ++iter)
|
||||
for(iter = mContent["LayerData"].beginArray(); iter != mContent["LayerData"].endArray(); ++iter)
|
||||
{
|
||||
const LLSD& layer_data = *iter;
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ extern AIHTTPTimeoutPolicy mapLayerResponder_timeout;
|
||||
|
||||
class LLMapLayerResponder : public LLHTTPClient::ResponderWithResult
|
||||
{
|
||||
/*virtual*/ void result(const LLSD& content);
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return mapLayerResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "LLMapLayerResponder"; }
|
||||
};
|
||||
|
||||
@@ -157,29 +157,29 @@ namespace LLMarketplaceImport
|
||||
class LLImportPostResponder : public LLHTTPClient::ResponderWithCompleted
|
||||
{
|
||||
public:
|
||||
/*virtual*/ void completed(U32 status, const std::string& reason, const LLSD& content)
|
||||
/*virtual*/ void httpCompleted(void)
|
||||
{
|
||||
slmPostTimer.stop();
|
||||
|
||||
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
|
||||
{
|
||||
llinfos << " SLM POST status: " << status << llendl;
|
||||
llinfos << " SLM POST reason: " << reason << llendl;
|
||||
llinfos << " SLM POST content: " << content.asString() << llendl;
|
||||
llinfos << " SLM POST status: " << mStatus << llendl;
|
||||
llinfos << " SLM POST reason: " << mReason << llendl;
|
||||
llinfos << " SLM POST content: " << mContent.asString() << llendl;
|
||||
llinfos << " SLM POST timer: " << slmPostTimer.getElapsedTimeF32() << llendl;
|
||||
}
|
||||
|
||||
// MAINT-2301 : we determined we can safely ignore that error in that context
|
||||
if (status == MarketplaceErrorCodes::IMPORT_JOB_TIMEOUT)
|
||||
if (mStatus == MarketplaceErrorCodes::IMPORT_JOB_TIMEOUT)
|
||||
{
|
||||
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
|
||||
{
|
||||
llinfos << " SLM POST : Ignoring time out status and treating it as success" << llendl;
|
||||
}
|
||||
status = MarketplaceErrorCodes::IMPORT_DONE;
|
||||
mStatus = MarketplaceErrorCodes::IMPORT_DONE;
|
||||
}
|
||||
|
||||
if (status >= MarketplaceErrorCodes::IMPORT_BAD_REQUEST)
|
||||
if (mStatus >= MarketplaceErrorCodes::IMPORT_BAD_REQUEST)
|
||||
{
|
||||
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
|
||||
{
|
||||
@@ -188,10 +188,10 @@ namespace LLMarketplaceImport
|
||||
sMarketplaceCookie.clear();
|
||||
}
|
||||
|
||||
sImportInProgress = (status == MarketplaceErrorCodes::IMPORT_DONE);
|
||||
sImportInProgress = (mStatus == MarketplaceErrorCodes::IMPORT_DONE);
|
||||
sImportPostPending = false;
|
||||
sImportResultStatus = status;
|
||||
sImportId = content;
|
||||
sImportResultStatus = mStatus;
|
||||
sImportId = mContent;
|
||||
}
|
||||
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return MPImportPostResponder_timeout; }
|
||||
@@ -203,9 +203,9 @@ namespace LLMarketplaceImport
|
||||
public:
|
||||
/*virtual*/ bool needsHeaders(void) const { return true; }
|
||||
|
||||
/*virtual*/ void completedHeaders(U32 status, std::string const& reason, AIHTTPReceivedHeaders const& headers)
|
||||
/*virtual*/ void completedHeaders(void)
|
||||
{
|
||||
if (status == HTTP_OK)
|
||||
if (mStatus == HTTP_OK)
|
||||
{
|
||||
std::string value = get_cookie("_slm_session");
|
||||
if (!value.empty())
|
||||
@@ -219,39 +219,39 @@ namespace LLMarketplaceImport
|
||||
}
|
||||
}
|
||||
|
||||
/*virtual*/ void completed(U32 status, const std::string& reason, const LLSD& content)
|
||||
/*virtual*/ void httpCompleted(void)
|
||||
{
|
||||
slmGetTimer.stop();
|
||||
|
||||
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
|
||||
{
|
||||
llinfos << " SLM GET status: " << status << llendl;
|
||||
llinfos << " SLM GET reason: " << reason << llendl;
|
||||
llinfos << " SLM GET content: " << content.asString() << llendl;
|
||||
llinfos << " SLM GET status: " << mStatus << llendl;
|
||||
llinfos << " SLM GET reason: " << mReason << llendl;
|
||||
llinfos << " SLM GET content: " << mContent.asString() << llendl;
|
||||
llinfos << " SLM GET timer: " << slmGetTimer.getElapsedTimeF32() << llendl;
|
||||
}
|
||||
|
||||
// MAINT-2452 : Do not clear the cookie on IMPORT_DONE_WITH_ERRORS : Happens when trying to import objects with wrong permissions
|
||||
// ACME-1221 : Do not clear the cookie on IMPORT_NOT_FOUND : Happens for newly created Merchant accounts that are initially empty
|
||||
if ((status >= MarketplaceErrorCodes::IMPORT_BAD_REQUEST) &&
|
||||
(status != MarketplaceErrorCodes::IMPORT_DONE_WITH_ERRORS) &&
|
||||
(status != MarketplaceErrorCodes::IMPORT_NOT_FOUND))
|
||||
if ((mStatus >= MarketplaceErrorCodes::IMPORT_BAD_REQUEST) &&
|
||||
(mStatus != MarketplaceErrorCodes::IMPORT_DONE_WITH_ERRORS) &&
|
||||
(mStatus != MarketplaceErrorCodes::IMPORT_NOT_FOUND))
|
||||
{
|
||||
if (gSavedSettings.getBOOL("InventoryOutboxLogging"))
|
||||
{
|
||||
llinfos << " SLM GET clearing marketplace cookie due to client or server error (" << status << " / " << reason << ")." << llendl;
|
||||
llinfos << " SLM GET clearing marketplace cookie due to client or server error (" << mStatus << " / " << mReason << ")." << llendl;
|
||||
}
|
||||
sMarketplaceCookie.clear();
|
||||
}
|
||||
else if (gSavedSettings.getBOOL("InventoryOutboxLogging") && (status >= MarketplaceErrorCodes::IMPORT_BAD_REQUEST))
|
||||
else if (gSavedSettings.getBOOL("InventoryOutboxLogging") && (mStatus >= MarketplaceErrorCodes::IMPORT_BAD_REQUEST))
|
||||
{
|
||||
llinfos << " SLM GET : Got error status = " << status << ", but marketplace cookie not cleared." << llendl;
|
||||
llinfos << " SLM GET : Got error status = " << mStatus << ", but marketplace cookie not cleared." << llendl;
|
||||
}
|
||||
|
||||
sImportInProgress = (status == MarketplaceErrorCodes::IMPORT_PROCESSING);
|
||||
sImportInProgress = (mStatus == MarketplaceErrorCodes::IMPORT_PROCESSING);
|
||||
sImportGetPending = false;
|
||||
sImportResultStatus = status;
|
||||
sImportResults = content;
|
||||
sImportResultStatus = mStatus;
|
||||
sImportResults = mContent;
|
||||
}
|
||||
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return MPImportGetResponder_timeout; }
|
||||
|
||||
@@ -73,8 +73,8 @@ public:
|
||||
LLMaterialsResponder(const std::string& pMethod, const std::string& pCapabilityURL, CallbackFunction pCallback);
|
||||
virtual ~LLMaterialsResponder();
|
||||
|
||||
virtual void result(const LLSD& pContent);
|
||||
virtual void error(U32 pStatus, const std::string& pReason);
|
||||
virtual void httpSuccess(void);
|
||||
virtual void httpFailure(void);
|
||||
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return materialsResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "LLMaterialsResponder"; }
|
||||
@@ -96,18 +96,18 @@ LLMaterialsResponder::~LLMaterialsResponder()
|
||||
{
|
||||
}
|
||||
|
||||
void LLMaterialsResponder::result(const LLSD& pContent)
|
||||
void LLMaterialsResponder::httpSuccess(void)
|
||||
{
|
||||
LL_DEBUGS("Materials") << LL_ENDL;
|
||||
mCallback(true, pContent);
|
||||
mCallback(true, mContent);
|
||||
}
|
||||
|
||||
void LLMaterialsResponder::error(U32 pStatus, const std::string& pReason)
|
||||
void LLMaterialsResponder::httpFailure(void)
|
||||
{
|
||||
LL_WARNS("Materials")
|
||||
<< "\n--------------------------------------------------------------------------\n"
|
||||
<< mMethod << " Error[" << pStatus << "] cannot access cap '" << MATERIALS_CAPABILITY_NAME
|
||||
<< "'\n with url '" << mCapabilityURL << "' because " << pReason
|
||||
<< mMethod << " Error[" << mStatus << "] cannot access cap '" << MATERIALS_CAPABILITY_NAME
|
||||
<< "'\n with url '" << mCapabilityURL << "' because " << mReason
|
||||
<< "\n--------------------------------------------------------------------------"
|
||||
<< LL_ENDL;
|
||||
|
||||
|
||||
@@ -564,7 +564,7 @@ LLMediaDataClient::Responder::Responder(const request_ptr_t &request)
|
||||
}
|
||||
|
||||
/*virtual*/
|
||||
void LLMediaDataClient::Responder::error(U32 status, const std::string& reason)
|
||||
void LLMediaDataClient::Responder::httpFailure(void)
|
||||
{
|
||||
mRequest->stopTracking();
|
||||
|
||||
@@ -574,7 +574,7 @@ void LLMediaDataClient::Responder::error(U32 status, const std::string& reason)
|
||||
return;
|
||||
}
|
||||
|
||||
if (status == HTTP_SERVICE_UNAVAILABLE)
|
||||
if (mStatus == HTTP_SERVICE_UNAVAILABLE)
|
||||
{
|
||||
F32 retry_timeout = mRequest->getRetryTimerDelay();
|
||||
|
||||
@@ -596,13 +596,12 @@ void LLMediaDataClient::Responder::error(U32 status, const std::string& reason)
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string msg = boost::lexical_cast<std::string>(status) + ": " + reason;
|
||||
LL_WARNS("LLMediaDataClient") << *mRequest << " http error(" << msg << ")" << LL_ENDL;
|
||||
LL_WARNS("LLMediaDataClient") << *mRequest << " http error: " << dumpResponse() << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
/*virtual*/
|
||||
void LLMediaDataClient::Responder::result(const LLSD& content)
|
||||
void LLMediaDataClient::Responder::httpSuccess(void)
|
||||
{
|
||||
mRequest->stopTracking();
|
||||
|
||||
@@ -612,7 +611,7 @@ void LLMediaDataClient::Responder::result(const LLSD& content)
|
||||
return;
|
||||
}
|
||||
|
||||
LL_DEBUGS("LLMediaDataClientResponse") << *mRequest << " result : " << ll_print_sd(content) << LL_ENDL;
|
||||
LL_DEBUGS("LLMediaDataClientResponse") << *mRequest << " result : " << ll_print_sd(mContent) << LL_ENDL;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -876,7 +875,7 @@ LLMediaDataClient::Responder *LLObjectMediaDataClient::RequestUpdate::createResp
|
||||
|
||||
|
||||
/*virtual*/
|
||||
void LLObjectMediaDataClient::Responder::result(const LLSD& content)
|
||||
void LLObjectMediaDataClient::Responder::httpSuccess(void)
|
||||
{
|
||||
getRequest()->stopTracking();
|
||||
|
||||
@@ -888,12 +887,12 @@ void LLObjectMediaDataClient::Responder::result(const LLSD& content)
|
||||
|
||||
// This responder is only used for GET requests, not UPDATE.
|
||||
|
||||
LL_DEBUGS("LLMediaDataClientResponse") << *(getRequest()) << " GET returned: " << ll_print_sd(content) << LL_ENDL;
|
||||
LL_DEBUGS("LLMediaDataClientResponse") << *(getRequest()) << " GET returned: " << ll_print_sd(mContent) << LL_ENDL;
|
||||
|
||||
// Look for an error
|
||||
if (content.has("error"))
|
||||
if (mContent.has("error"))
|
||||
{
|
||||
const LLSD &error = content["error"];
|
||||
const LLSD &error = mContent["error"];
|
||||
LL_WARNS("LLMediaDataClient") << *(getRequest()) << " Error getting media data for object: code=" <<
|
||||
error["code"].asString() << ": " << error["message"].asString() << LL_ENDL;
|
||||
|
||||
@@ -902,7 +901,7 @@ void LLObjectMediaDataClient::Responder::result(const LLSD& content)
|
||||
else
|
||||
{
|
||||
// Check the data
|
||||
const LLUUID &object_id = content[LLTextureEntry::OBJECT_ID_KEY];
|
||||
const LLUUID &object_id = mContent[LLTextureEntry::OBJECT_ID_KEY];
|
||||
if (object_id != getRequest()->getObject()->getID())
|
||||
{
|
||||
// NOT good, wrong object id!!
|
||||
@@ -911,8 +910,8 @@ void LLObjectMediaDataClient::Responder::result(const LLSD& content)
|
||||
}
|
||||
|
||||
// Otherwise, update with object media data
|
||||
getRequest()->getObject()->updateObjectMediaData(content[LLTextureEntry::OBJECT_MEDIA_DATA_KEY],
|
||||
content[LLTextureEntry::MEDIA_VERSION_KEY]);
|
||||
getRequest()->getObject()->updateObjectMediaData(mContent[LLTextureEntry::OBJECT_MEDIA_DATA_KEY],
|
||||
mContent[LLTextureEntry::MEDIA_VERSION_KEY]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1003,7 +1002,7 @@ LLMediaDataClient::Responder *LLObjectMediaNavigateClient::RequestNavigate::crea
|
||||
}
|
||||
|
||||
/*virtual*/
|
||||
void LLObjectMediaNavigateClient::Responder::error(U32 status, const std::string& reason)
|
||||
void LLObjectMediaNavigateClient::Responder::httpFailure(void)
|
||||
{
|
||||
getRequest()->stopTracking();
|
||||
|
||||
@@ -1015,14 +1014,14 @@ void LLObjectMediaNavigateClient::Responder::error(U32 status, const std::string
|
||||
|
||||
// Bounce back (unless HTTP_SERVICE_UNAVAILABLE, in which case call base
|
||||
// class
|
||||
if (status == HTTP_SERVICE_UNAVAILABLE)
|
||||
if (mStatus == HTTP_SERVICE_UNAVAILABLE)
|
||||
{
|
||||
LLMediaDataClient::Responder::error(status, reason);
|
||||
LLMediaDataClient::Responder::httpFailure();
|
||||
}
|
||||
else
|
||||
{
|
||||
// bounce the face back
|
||||
LL_WARNS("LLMediaDataClient") << *(getRequest()) << " Error navigating: http code=" << status << LL_ENDL;
|
||||
LL_WARNS("LLMediaDataClient") << *(getRequest()) << " Error navigating: http code=" << mStatus << LL_ENDL;
|
||||
const LLSD &payload = getRequest()->getPayload();
|
||||
// bounce the face back
|
||||
getRequest()->getObject()->mediaNavigateBounceBack((LLSD::Integer)payload[LLTextureEntry::TEXTURE_INDEX_KEY]);
|
||||
@@ -1030,7 +1029,7 @@ void LLObjectMediaNavigateClient::Responder::error(U32 status, const std::string
|
||||
}
|
||||
|
||||
/*virtual*/
|
||||
void LLObjectMediaNavigateClient::Responder::result(const LLSD& content)
|
||||
void LLObjectMediaNavigateClient::Responder::httpSuccess(void)
|
||||
{
|
||||
getRequest()->stopTracking();
|
||||
|
||||
@@ -1040,11 +1039,11 @@ void LLObjectMediaNavigateClient::Responder::result(const LLSD& content)
|
||||
return;
|
||||
}
|
||||
|
||||
LL_INFOS("LLMediaDataClient") << *(getRequest()) << " NAVIGATE returned " << ll_print_sd(content) << LL_ENDL;
|
||||
LL_INFOS("LLMediaDataClient") << *(getRequest()) << " NAVIGATE returned " << ll_print_sd(mContent) << LL_ENDL;
|
||||
|
||||
if (content.has("error"))
|
||||
if (mContent.has("error"))
|
||||
{
|
||||
const LLSD &error = content["error"];
|
||||
const LLSD &error = mContent["error"];
|
||||
int error_code = error["code"];
|
||||
|
||||
if (ERROR_PERMISSION_DENIED_CODE == error_code)
|
||||
@@ -1065,6 +1064,6 @@ void LLObjectMediaNavigateClient::Responder::result(const LLSD& content)
|
||||
else
|
||||
{
|
||||
// No action required.
|
||||
LL_DEBUGS("LLMediaDataClientResponse") << *(getRequest()) << " result : " << ll_print_sd(content) << LL_ENDL;
|
||||
LL_DEBUGS("LLMediaDataClientResponse") << *(getRequest()) << " result : " << ll_print_sd(mContent) << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,9 +197,9 @@ protected:
|
||||
|
||||
Responder(const request_ptr_t &request);
|
||||
//If we get back an error (not found, etc...), handle it here
|
||||
virtual void error(U32 status, const std::string& reason);
|
||||
virtual void httpFailure(void);
|
||||
//If we get back a normal response, handle it here. Default just logs it.
|
||||
virtual void result(const LLSD& content);
|
||||
virtual void httpSuccess(void);
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return mediaDataClientResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "LLMediaDataClientResponder"; }
|
||||
|
||||
@@ -348,7 +348,7 @@ protected:
|
||||
public:
|
||||
Responder(const request_ptr_t &request)
|
||||
: LLMediaDataClient::Responder(request) {}
|
||||
virtual void result(const LLSD &content);
|
||||
virtual void httpSuccess(void);
|
||||
};
|
||||
private:
|
||||
// The Get/Update data client needs a second queue to avoid object updates starving load-ins.
|
||||
@@ -404,8 +404,8 @@ protected:
|
||||
public:
|
||||
Responder(const request_ptr_t &request)
|
||||
: LLMediaDataClient::Responder(request) {}
|
||||
virtual void error(U32 status, const std::string& reason);
|
||||
virtual void result(const LLSD &content);
|
||||
virtual void httpFailure(void);
|
||||
virtual void httpSuccess(void);
|
||||
private:
|
||||
void mediaNavigateBounceBack();
|
||||
};
|
||||
|
||||
@@ -240,9 +240,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void completedRaw(U32 status, const std::string& reason,
|
||||
const LLChannelDescriptors& channels,
|
||||
const LLIOPipe::buffer_ptr_t& buffer);
|
||||
virtual void completedRaw(LLChannelDescriptors const& channels,
|
||||
LLIOPipe::buffer_ptr_t const& buffer);
|
||||
|
||||
/*virtual*/ AICapabilityType capability_type(void) const { return cap_mesh; }
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return meshHeaderResponder_timeout; }
|
||||
@@ -279,9 +278,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void completedRaw(U32 status, const std::string& reason,
|
||||
const LLChannelDescriptors& channels,
|
||||
const LLIOPipe::buffer_ptr_t& buffer);
|
||||
virtual void completedRaw(LLChannelDescriptors const& channels,
|
||||
LLIOPipe::buffer_ptr_t const& buffer);
|
||||
|
||||
/*virtual*/ AICapabilityType capability_type(void) const { return cap_mesh; }
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return meshLODResponder_timeout; }
|
||||
@@ -314,9 +312,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void completedRaw(U32 status, const std::string& reason,
|
||||
const LLChannelDescriptors& channels,
|
||||
const LLIOPipe::buffer_ptr_t& buffer);
|
||||
virtual void completedRaw(LLChannelDescriptors const& channels,
|
||||
LLIOPipe::buffer_ptr_t const& buffer);
|
||||
|
||||
/*virtual*/ AICapabilityType capability_type(void) const { return cap_mesh; }
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return meshSkinInfoResponder_timeout; }
|
||||
@@ -349,9 +346,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void completedRaw(U32 status, const std::string& reason,
|
||||
const LLChannelDescriptors& channels,
|
||||
const LLIOPipe::buffer_ptr_t& buffer);
|
||||
virtual void completedRaw(LLChannelDescriptors const& channels,
|
||||
LLIOPipe::buffer_ptr_t const& buffer);
|
||||
|
||||
/*virtual*/ AICapabilityType capability_type(void) const { return cap_mesh; }
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return meshDecompositionResponder_timeout; }
|
||||
@@ -384,9 +380,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void completedRaw(U32 status, const std::string& reason,
|
||||
const LLChannelDescriptors& channels,
|
||||
const LLIOPipe::buffer_ptr_t& buffer);
|
||||
virtual void completedRaw(LLChannelDescriptors const& channels,
|
||||
LLIOPipe::buffer_ptr_t const& buffer);
|
||||
|
||||
/*virtual*/ AICapabilityType capability_type(void) const { return cap_mesh; }
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return meshPhysicsShapeResponder_timeout; }
|
||||
@@ -459,11 +454,9 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual void completed(U32 status,
|
||||
const std::string& reason,
|
||||
const LLSD& content)
|
||||
virtual void httpCompleted(void)
|
||||
{
|
||||
LLSD cc = content;
|
||||
LLSD cc = mContent;
|
||||
if (gSavedSettings.getS32("MeshUploadFakeErrors")&1)
|
||||
{
|
||||
cc = llsd_from_file("fake_upload_error.xml");
|
||||
@@ -473,7 +466,7 @@ public:
|
||||
|
||||
LLWholeModelFeeObserver* observer = mObserverHandle.get();
|
||||
|
||||
if (isGoodStatus(status) &&
|
||||
if (isGoodStatus(mStatus) &&
|
||||
cc["state"].asString() == "upload")
|
||||
{
|
||||
mWholeModelUploadURL = cc["uploader"].asString();
|
||||
@@ -487,12 +480,12 @@ public:
|
||||
else
|
||||
{
|
||||
llwarns << "fee request failed" << llendl;
|
||||
log_upload_error(status,cc,"fee",mModelData["name"]);
|
||||
log_upload_error(mStatus,cc,"fee",mModelData["name"]);
|
||||
mWholeModelUploadURL = "";
|
||||
|
||||
if (observer)
|
||||
{
|
||||
observer->setModelPhysicsFeeErrorStatus(status, reason);
|
||||
observer->setModelPhysicsFeeErrorStatus(mStatus, mReason);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -517,11 +510,9 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual void completed(U32 status,
|
||||
const std::string& reason,
|
||||
const LLSD& content)
|
||||
virtual void httpCompleted(void)
|
||||
{
|
||||
LLSD cc = content;
|
||||
LLSD cc = mContent;
|
||||
if (gSavedSettings.getS32("MeshUploadFakeErrors")&2)
|
||||
{
|
||||
cc = llsd_from_file("fake_upload_error.xml");
|
||||
@@ -533,7 +524,7 @@ public:
|
||||
|
||||
// requested "mesh" asset type isn't actually the type
|
||||
// of the resultant object, fix it up here.
|
||||
if (isGoodStatus(status) &&
|
||||
if (isGoodStatus(mStatus) &&
|
||||
cc["state"].asString() == "complete")
|
||||
{
|
||||
mModelData["asset_type"] = "object";
|
||||
@@ -548,7 +539,7 @@ public:
|
||||
{
|
||||
llwarns << "upload failed" << llendl;
|
||||
std::string model_name = mModelData["name"].asString();
|
||||
log_upload_error(status,cc,"upload",model_name);
|
||||
log_upload_error(mStatus,cc,"upload",model_name);
|
||||
|
||||
if (observer)
|
||||
{
|
||||
@@ -1887,9 +1878,8 @@ void LLMeshRepository::cacheOutgoingMesh(LLMeshUploadData& data, LLSD& header)
|
||||
|
||||
}
|
||||
|
||||
void LLMeshLODResponder::completedRaw(U32 status, const std::string& reason,
|
||||
const LLChannelDescriptors& channels,
|
||||
const LLIOPipe::buffer_ptr_t& buffer)
|
||||
void LLMeshLODResponder::completedRaw(LLChannelDescriptors const& channels,
|
||||
LLIOPipe::buffer_ptr_t const& buffer)
|
||||
{
|
||||
mProcessed = true;
|
||||
|
||||
@@ -1901,14 +1891,14 @@ void LLMeshLODResponder::completedRaw(U32 status, const std::string& reason,
|
||||
|
||||
S32 data_size = buffer->countAfter(channels.in(), NULL);
|
||||
|
||||
if (status < 200 || status >= 400)
|
||||
if (mStatus < 200 || mStatus >= 400)
|
||||
{
|
||||
llwarns << status << ": " << reason << llendl;
|
||||
llwarns << mStatus << ": " << mReason << llendl;
|
||||
}
|
||||
|
||||
if (data_size < (S32)mRequestedBytes)
|
||||
{
|
||||
if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE)
|
||||
if (is_internal_http_error_that_warrants_a_retry(mStatus) || mStatus == HTTP_SERVICE_UNAVAILABLE)
|
||||
{ //timeout or service unavailable, try again
|
||||
llwarns << "Timeout or service unavailable, retrying." << llendl;
|
||||
LLMeshRepository::sHTTPRetryCount++;
|
||||
@@ -1916,8 +1906,8 @@ void LLMeshLODResponder::completedRaw(U32 status, const std::string& reason,
|
||||
}
|
||||
else
|
||||
{
|
||||
llassert(is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint
|
||||
llwarns << "Unhandled status " << status << llendl;
|
||||
llassert(is_internal_http_error_that_warrants_a_retry(mStatus) || mStatus == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint
|
||||
llwarns << "Unhandled status " << mStatus << llendl;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1951,9 +1941,8 @@ void LLMeshLODResponder::completedRaw(U32 status, const std::string& reason,
|
||||
delete [] data;
|
||||
}
|
||||
|
||||
void LLMeshSkinInfoResponder::completedRaw(U32 status, const std::string& reason,
|
||||
const LLChannelDescriptors& channels,
|
||||
const LLIOPipe::buffer_ptr_t& buffer)
|
||||
void LLMeshSkinInfoResponder::completedRaw(LLChannelDescriptors const& channels,
|
||||
LLIOPipe::buffer_ptr_t const& buffer)
|
||||
{
|
||||
mProcessed = true;
|
||||
|
||||
@@ -1965,14 +1954,14 @@ void LLMeshSkinInfoResponder::completedRaw(U32 status, const std::string& reason
|
||||
|
||||
S32 data_size = buffer->countAfter(channels.in(), NULL);
|
||||
|
||||
if (status < 200 || status >= 400)
|
||||
if (mStatus < 200 || mStatus >= 400)
|
||||
{
|
||||
llwarns << status << ": " << reason << llendl;
|
||||
llwarns << mStatus << ": " << mReason << llendl;
|
||||
}
|
||||
|
||||
if (data_size < (S32)mRequestedBytes)
|
||||
{
|
||||
if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE)
|
||||
if (is_internal_http_error_that_warrants_a_retry(mStatus) || mStatus == HTTP_SERVICE_UNAVAILABLE)
|
||||
{ //timeout or service unavailable, try again
|
||||
llwarns << "Timeout or service unavailable, retrying loadMeshSkinInfo() for " << mMeshID << llendl;
|
||||
LLMeshRepository::sHTTPRetryCount++;
|
||||
@@ -1980,8 +1969,8 @@ void LLMeshSkinInfoResponder::completedRaw(U32 status, const std::string& reason
|
||||
}
|
||||
else
|
||||
{
|
||||
llassert(is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint
|
||||
llwarns << "Unhandled status " << status << llendl;
|
||||
llassert(is_internal_http_error_that_warrants_a_retry(mStatus) || mStatus == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint
|
||||
llwarns << "Unhandled status " << mStatus << llendl;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -2015,9 +2004,8 @@ void LLMeshSkinInfoResponder::completedRaw(U32 status, const std::string& reason
|
||||
delete [] data;
|
||||
}
|
||||
|
||||
void LLMeshDecompositionResponder::completedRaw(U32 status, const std::string& reason,
|
||||
const LLChannelDescriptors& channels,
|
||||
const LLIOPipe::buffer_ptr_t& buffer)
|
||||
void LLMeshDecompositionResponder::completedRaw(LLChannelDescriptors const& channels,
|
||||
LLIOPipe::buffer_ptr_t const& buffer)
|
||||
{
|
||||
mProcessed = true;
|
||||
|
||||
@@ -2028,14 +2016,14 @@ void LLMeshDecompositionResponder::completedRaw(U32 status, const std::string& r
|
||||
|
||||
S32 data_size = buffer->countAfter(channels.in(), NULL);
|
||||
|
||||
if (status < 200 || status >= 400)
|
||||
if (mStatus < 200 || mStatus >= 400)
|
||||
{
|
||||
llwarns << status << ": " << reason << llendl;
|
||||
llwarns << mStatus << ": " << mReason << llendl;
|
||||
}
|
||||
|
||||
if (data_size < (S32)mRequestedBytes)
|
||||
{
|
||||
if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE)
|
||||
if (is_internal_http_error_that_warrants_a_retry(mStatus) || mStatus == HTTP_SERVICE_UNAVAILABLE)
|
||||
{ //timeout or service unavailable, try again
|
||||
llwarns << "Timeout or service unavailable, retrying loadMeshDecomposition() for " << mMeshID << llendl;
|
||||
LLMeshRepository::sHTTPRetryCount++;
|
||||
@@ -2043,8 +2031,8 @@ void LLMeshDecompositionResponder::completedRaw(U32 status, const std::string& r
|
||||
}
|
||||
else
|
||||
{
|
||||
llassert(is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint
|
||||
llwarns << "Unhandled status " << status << llendl;
|
||||
llassert(is_internal_http_error_that_warrants_a_retry(mStatus) || mStatus == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint
|
||||
llwarns << "Unhandled status " << mStatus << llendl;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -2078,9 +2066,8 @@ void LLMeshDecompositionResponder::completedRaw(U32 status, const std::string& r
|
||||
delete [] data;
|
||||
}
|
||||
|
||||
void LLMeshPhysicsShapeResponder::completedRaw(U32 status, const std::string& reason,
|
||||
const LLChannelDescriptors& channels,
|
||||
const LLIOPipe::buffer_ptr_t& buffer)
|
||||
void LLMeshPhysicsShapeResponder::completedRaw(LLChannelDescriptors const& channels,
|
||||
LLIOPipe::buffer_ptr_t const& buffer)
|
||||
{
|
||||
mProcessed = true;
|
||||
|
||||
@@ -2092,14 +2079,14 @@ void LLMeshPhysicsShapeResponder::completedRaw(U32 status, const std::string& re
|
||||
|
||||
S32 data_size = buffer->countAfter(channels.in(), NULL);
|
||||
|
||||
if (status < 200 || status >= 400)
|
||||
if (mStatus < 200 || mStatus >= 400)
|
||||
{
|
||||
llwarns << status << ": " << reason << llendl;
|
||||
llwarns << mStatus << ": " << mReason << llendl;
|
||||
}
|
||||
|
||||
if (data_size < (S32)mRequestedBytes)
|
||||
{
|
||||
if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE)
|
||||
if (is_internal_http_error_that_warrants_a_retry(mStatus) || mStatus == HTTP_SERVICE_UNAVAILABLE)
|
||||
{ //timeout or service unavailable, try again
|
||||
llwarns << "Timeout or service unavailable, retrying loadMeshPhysicsShape() for " << mMeshID << llendl;
|
||||
LLMeshRepository::sHTTPRetryCount++;
|
||||
@@ -2107,8 +2094,8 @@ void LLMeshPhysicsShapeResponder::completedRaw(U32 status, const std::string& re
|
||||
}
|
||||
else
|
||||
{
|
||||
llassert(is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint
|
||||
llwarns << "Unhandled status " << status << llendl;
|
||||
llassert(is_internal_http_error_that_warrants_a_retry(mStatus) || mStatus == HTTP_SERVICE_UNAVAILABLE); //intentionally trigger a breakpoint
|
||||
llwarns << "Unhandled status " << mStatus << llendl;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -2142,9 +2129,8 @@ void LLMeshPhysicsShapeResponder::completedRaw(U32 status, const std::string& re
|
||||
delete [] data;
|
||||
}
|
||||
|
||||
void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason,
|
||||
const LLChannelDescriptors& channels,
|
||||
const LLIOPipe::buffer_ptr_t& buffer)
|
||||
void LLMeshHeaderResponder::completedRaw(LLChannelDescriptors const& channels,
|
||||
LLIOPipe::buffer_ptr_t const& buffer)
|
||||
{
|
||||
mProcessed = true;
|
||||
|
||||
@@ -2154,11 +2140,11 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason,
|
||||
return;
|
||||
}
|
||||
|
||||
if (status < 200 || status >= 400)
|
||||
if (mStatus < 200 || mStatus >= 400)
|
||||
{
|
||||
//llwarns
|
||||
// << "Header responder failed with status: "
|
||||
// << status << ": " << reason << llendl;
|
||||
// << mStatus << ": " << mReason << llendl;
|
||||
|
||||
// 503 (service unavailable) or HTTP_INTERNAL_ERROR_*'s.
|
||||
// can be due to server load and can be retried
|
||||
@@ -2167,9 +2153,9 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason,
|
||||
// and (somewhat more optional than the others) retries
|
||||
// again after some set period of time
|
||||
|
||||
llassert(status == HTTP_NOT_FOUND || status == HTTP_SERVICE_UNAVAILABLE || status == HTTP_REQUEST_TIME_OUT || is_internal_http_error_that_warrants_a_retry(status));
|
||||
llassert(mStatus == HTTP_NOT_FOUND || mStatus == HTTP_SERVICE_UNAVAILABLE || mStatus == HTTP_REQUEST_TIME_OUT || is_internal_http_error_that_warrants_a_retry(mStatus));
|
||||
|
||||
if (is_internal_http_error_that_warrants_a_retry(status) || status == HTTP_SERVICE_UNAVAILABLE)
|
||||
if (is_internal_http_error_that_warrants_a_retry(mStatus) || mStatus == HTTP_SERVICE_UNAVAILABLE)
|
||||
{ //retry
|
||||
llwarns << "Timeout or service unavailable, retrying." << llendl;
|
||||
LLMeshRepository::sHTTPRetryCount++;
|
||||
@@ -2181,7 +2167,7 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason,
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Unhandled status: " << status << llendl;
|
||||
llwarns << "Unhandled status: " << mStatus << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2205,7 +2191,7 @@ void LLMeshHeaderResponder::completedRaw(U32 status, const std::string& reason,
|
||||
{
|
||||
llwarns
|
||||
<< "Unable to parse mesh header: "
|
||||
<< status << ": " << reason << llendl;
|
||||
<< mStatus << ": " << mReason << llendl;
|
||||
}
|
||||
else if (data && data_size > 0)
|
||||
{
|
||||
|
||||
@@ -688,7 +688,7 @@ public:
|
||||
}
|
||||
|
||||
//If we get back a normal response, handle it here
|
||||
/*virtual*/ void result(const LLSD& content)
|
||||
/*virtual*/ void httpSuccess(void)
|
||||
{
|
||||
//Ack'd the proposal initialization, now let's finish up.
|
||||
LLPanelGroupVoting::handleResponse(
|
||||
@@ -697,10 +697,10 @@ public:
|
||||
}
|
||||
|
||||
//If we get back an error (not found, etc...), handle it here
|
||||
/*virtual*/ void error(U32 status, const std::string& reason)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
llinfos << "LLPanelGroupVotingResponder::error "
|
||||
<< status << ": " << reason << llendl;
|
||||
<< mStatus << ": " << mReason << llendl;
|
||||
|
||||
LLPanelGroupVoting::handleFailure(mGroupID);
|
||||
}
|
||||
@@ -721,20 +721,20 @@ public:
|
||||
}
|
||||
|
||||
//If we get back a normal response, handle it here
|
||||
/*virtual*/ void result(const LLSD& content)
|
||||
/*virtual*/ void httpSuccess(void)
|
||||
{
|
||||
//Ack'd the proposal initialization, now let's finish up.
|
||||
LLPanelGroupVoting::handleResponse(
|
||||
mGroupID,
|
||||
LLPanelGroupVoting::BALLOT,
|
||||
content["voted"].asBoolean());
|
||||
mContent["voted"].asBoolean());
|
||||
}
|
||||
|
||||
//If we get back an error (not found, etc...), handle it here
|
||||
/*virtual*/ void error(U32 status, const std::string& reason)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
llinfos << "LLPanelGroupVotingResponder::error "
|
||||
<< status << ": " << reason << llendl;
|
||||
<< mStatus << ": " << mReason << llendl;
|
||||
|
||||
LLPanelGroupVoting::handleFailure(mGroupID);
|
||||
}
|
||||
|
||||
@@ -116,8 +116,8 @@ public:
|
||||
NavMeshStatusResponder(const std::string &pCapabilityURL, LLViewerRegion *pRegion, bool pIsGetStatusOnly);
|
||||
virtual ~NavMeshStatusResponder();
|
||||
|
||||
/*virtual*/ void result(const LLSD &pContent);
|
||||
/*virtual*/ void error(U32 pStatus, const std::string& pReason);
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return navMeshStatusResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "NavMeshStatusResponder"; }
|
||||
|
||||
@@ -140,8 +140,8 @@ public:
|
||||
NavMeshResponder(const std::string &pCapabilityURL, U32 pNavMeshVersion, LLPathfindingNavMeshPtr pNavMeshPtr);
|
||||
virtual ~NavMeshResponder();
|
||||
|
||||
/*virtual*/ void result(const LLSD &pContent);
|
||||
/*virtual*/ void error(U32 pStatus, const std::string& pReason);
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return navMeshResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "NavMeshResponder"; }
|
||||
|
||||
@@ -163,8 +163,8 @@ public:
|
||||
AgentStateResponder(const std::string &pCapabilityURL);
|
||||
virtual ~AgentStateResponder();
|
||||
|
||||
/*virtual*/ void result(const LLSD &pContent);
|
||||
/*virtual*/ void error(U32 pStatus, const std::string& pReason);
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return agentStateResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "AgentStateResponder"; }
|
||||
|
||||
@@ -184,8 +184,8 @@ public:
|
||||
NavMeshRebakeResponder(const std::string &pCapabilityURL, LLPathfindingManager::rebake_navmesh_callback_t pRebakeNavMeshCallback);
|
||||
virtual ~NavMeshRebakeResponder();
|
||||
|
||||
/*virtual*/ void result(const LLSD &pContent);
|
||||
/*virtual*/ void error(U32 pStatus, const std::string& pReason);
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return navMeshRebakeResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "NavMeshRebakeResponder"; }
|
||||
|
||||
@@ -245,8 +245,8 @@ public:
|
||||
ObjectLinksetsResponder(const std::string &pCapabilityURL, LinksetsResponderPtr pLinksetsResponsderPtr);
|
||||
virtual ~ObjectLinksetsResponder();
|
||||
|
||||
/*virtual*/ void result(const LLSD &pContent);
|
||||
/*virtual*/ void error(U32 pStatus, const std::string &pReason);
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return objectLinksetsResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "ObjectLinksetsResponder"; }
|
||||
|
||||
@@ -266,8 +266,8 @@ public:
|
||||
TerrainLinksetsResponder(const std::string &pCapabilityURL, LinksetsResponderPtr pLinksetsResponsderPtr);
|
||||
virtual ~TerrainLinksetsResponder();
|
||||
|
||||
/*virtual*/ void result(const LLSD &pContent);
|
||||
/*virtual*/ void error(U32 pStatus, const std::string &pReason);
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return terrainLinksetsResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "TerrainLinksetsResponder"; }
|
||||
|
||||
@@ -287,8 +287,8 @@ public:
|
||||
CharactersResponder(const std::string &pCapabilityURL, LLPathfindingManager::request_id_t pRequestId, LLPathfindingManager::object_request_callback_t pCharactersCallback);
|
||||
virtual ~CharactersResponder();
|
||||
|
||||
/*virtual*/ void result(const LLSD &pContent);
|
||||
/*virtual*/ void error(U32 pStatus, const std::string &pReason);
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return charactersResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "CharactersResponder"; }
|
||||
|
||||
@@ -813,15 +813,15 @@ NavMeshStatusResponder::~NavMeshStatusResponder()
|
||||
{
|
||||
}
|
||||
|
||||
void NavMeshStatusResponder::result(const LLSD &pContent)
|
||||
void NavMeshStatusResponder::httpSuccess(void)
|
||||
{
|
||||
LLPathfindingNavMeshStatus navMeshStatus(mRegionUUID, pContent);
|
||||
LLPathfindingNavMeshStatus navMeshStatus(mRegionUUID, mContent);
|
||||
LLPathfindingManager::getInstance()->handleNavMeshStatusRequest(navMeshStatus, mRegion, mIsGetStatusOnly);
|
||||
}
|
||||
|
||||
void NavMeshStatusResponder::error(U32 pStatus, const std::string& pReason)
|
||||
void NavMeshStatusResponder::httpFailure(void)
|
||||
{
|
||||
llwarns << "error with request to URL '" << mCapabilityURL << "' because " << pReason << " (statusCode:" << pStatus << ")" << llendl;
|
||||
llwarns << "error with request to URL '" << mCapabilityURL << "' because " << mReason << " (statusCode:" << mStatus << ")" << llendl;
|
||||
LLPathfindingNavMeshStatus navMeshStatus(mRegionUUID);
|
||||
LLPathfindingManager::getInstance()->handleNavMeshStatusRequest(navMeshStatus, mRegion, mIsGetStatusOnly);
|
||||
}
|
||||
@@ -841,14 +841,14 @@ NavMeshResponder::~NavMeshResponder()
|
||||
{
|
||||
}
|
||||
|
||||
void NavMeshResponder::result(const LLSD &pContent)
|
||||
void NavMeshResponder::httpSuccess(void)
|
||||
{
|
||||
mNavMeshPtr->handleNavMeshResult(pContent, mNavMeshVersion);
|
||||
mNavMeshPtr->handleNavMeshResult(mContent, mNavMeshVersion);
|
||||
}
|
||||
|
||||
void NavMeshResponder::error(U32 pStatus, const std::string& pReason)
|
||||
void NavMeshResponder::httpFailure(void)
|
||||
{
|
||||
mNavMeshPtr->handleNavMeshError(pStatus, pReason, mCapabilityURL, mNavMeshVersion);
|
||||
mNavMeshPtr->handleNavMeshError(mStatus, mReason, mCapabilityURL, mNavMeshVersion);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -863,17 +863,17 @@ AgentStateResponder::~AgentStateResponder()
|
||||
{
|
||||
}
|
||||
|
||||
void AgentStateResponder::result(const LLSD &pContent)
|
||||
void AgentStateResponder::httpSuccess(void)
|
||||
{
|
||||
llassert(pContent.has(AGENT_STATE_CAN_REBAKE_REGION_FIELD));
|
||||
llassert(pContent.get(AGENT_STATE_CAN_REBAKE_REGION_FIELD).isBoolean());
|
||||
BOOL canRebakeRegion = pContent.get(AGENT_STATE_CAN_REBAKE_REGION_FIELD).asBoolean();
|
||||
llassert(mContent.has(AGENT_STATE_CAN_REBAKE_REGION_FIELD));
|
||||
llassert(mContent.get(AGENT_STATE_CAN_REBAKE_REGION_FIELD).isBoolean());
|
||||
BOOL canRebakeRegion = mContent.get(AGENT_STATE_CAN_REBAKE_REGION_FIELD).asBoolean();
|
||||
LLPathfindingManager::getInstance()->handleAgentState(canRebakeRegion);
|
||||
}
|
||||
|
||||
void AgentStateResponder::error(U32 pStatus, const std::string &pReason)
|
||||
void AgentStateResponder::httpFailure(void)
|
||||
{
|
||||
llwarns << "error with request to URL '" << mCapabilityURL << "' because " << pReason << " (statusCode:" << pStatus << ")" << llendl;
|
||||
llwarns << "error with request to URL '" << mCapabilityURL << "' because " << mReason << " (statusCode:" << mStatus << ")" << llendl;
|
||||
LLPathfindingManager::getInstance()->handleAgentState(FALSE);
|
||||
}
|
||||
|
||||
@@ -891,14 +891,14 @@ NavMeshRebakeResponder::~NavMeshRebakeResponder()
|
||||
{
|
||||
}
|
||||
|
||||
void NavMeshRebakeResponder::result(const LLSD &pContent)
|
||||
void NavMeshRebakeResponder::httpSuccess(void)
|
||||
{
|
||||
mRebakeNavMeshCallback(true);
|
||||
}
|
||||
|
||||
void NavMeshRebakeResponder::error(U32 pStatus, const std::string &pReason)
|
||||
void NavMeshRebakeResponder::httpFailure(void)
|
||||
{
|
||||
llwarns << "error with request to URL '" << mCapabilityURL << "' because " << pReason << " (statusCode:" << pStatus << ")" << llendl;
|
||||
llwarns << "error with request to URL '" << mCapabilityURL << "' because " << mReason << " (statusCode:" << mStatus << ")" << llendl;
|
||||
mRebakeNavMeshCallback(false);
|
||||
}
|
||||
|
||||
@@ -997,14 +997,14 @@ ObjectLinksetsResponder::~ObjectLinksetsResponder()
|
||||
{
|
||||
}
|
||||
|
||||
void ObjectLinksetsResponder::result(const LLSD &pContent)
|
||||
void ObjectLinksetsResponder::httpSuccess(void)
|
||||
{
|
||||
mLinksetsResponsderPtr->handleObjectLinksetsResult(pContent);
|
||||
mLinksetsResponsderPtr->handleObjectLinksetsResult(mContent);
|
||||
}
|
||||
|
||||
void ObjectLinksetsResponder::error(U32 pStatus, const std::string &pReason)
|
||||
void ObjectLinksetsResponder::httpFailure(void)
|
||||
{
|
||||
mLinksetsResponsderPtr->handleObjectLinksetsError(pStatus, pReason, mCapabilityURL);
|
||||
mLinksetsResponsderPtr->handleObjectLinksetsError(mStatus, mReason, mCapabilityURL);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -1021,14 +1021,14 @@ TerrainLinksetsResponder::~TerrainLinksetsResponder()
|
||||
{
|
||||
}
|
||||
|
||||
void TerrainLinksetsResponder::result(const LLSD &pContent)
|
||||
void TerrainLinksetsResponder::httpSuccess(void)
|
||||
{
|
||||
mLinksetsResponsderPtr->handleTerrainLinksetsResult(pContent);
|
||||
mLinksetsResponsderPtr->handleTerrainLinksetsResult(mContent);
|
||||
}
|
||||
|
||||
void TerrainLinksetsResponder::error(U32 pStatus, const std::string &pReason)
|
||||
void TerrainLinksetsResponder::httpFailure(void)
|
||||
{
|
||||
mLinksetsResponsderPtr->handleTerrainLinksetsError(pStatus, pReason, mCapabilityURL);
|
||||
mLinksetsResponsderPtr->handleTerrainLinksetsError(mStatus, mReason, mCapabilityURL);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
@@ -1046,15 +1046,15 @@ CharactersResponder::~CharactersResponder()
|
||||
{
|
||||
}
|
||||
|
||||
void CharactersResponder::result(const LLSD &pContent)
|
||||
void CharactersResponder::httpSuccess(void)
|
||||
{
|
||||
LLPathfindingObjectListPtr characterListPtr = LLPathfindingObjectListPtr(new LLPathfindingCharacterList(pContent));
|
||||
LLPathfindingObjectListPtr characterListPtr = LLPathfindingObjectListPtr(new LLPathfindingCharacterList(mContent));
|
||||
mCharactersCallback(mRequestId, LLPathfindingManager::kRequestCompleted, characterListPtr);
|
||||
}
|
||||
|
||||
void CharactersResponder::error(U32 pStatus, const std::string &pReason)
|
||||
void CharactersResponder::httpFailure(void)
|
||||
{
|
||||
llwarns << "error with request to URL '" << mCapabilityURL << "' because " << pReason << " (statusCode:" << pStatus << ")" << llendl;
|
||||
llwarns << "error with request to URL '" << mCapabilityURL << "' because " << mReason << " (statusCode:" << mStatus << ")" << llendl;
|
||||
|
||||
LLPathfindingObjectListPtr characterListPtr = LLPathfindingObjectListPtr(new LLPathfindingCharacterList());
|
||||
mCharactersCallback(mRequestId, LLPathfindingManager::kRequestError, characterListPtr);
|
||||
|
||||
@@ -46,16 +46,15 @@ class LLProductInfoRequestResponder : public LLHTTPClient::ResponderWithResult
|
||||
{
|
||||
public:
|
||||
//If we get back a normal response, handle it here
|
||||
/*virtual*/ void result(const LLSD& content)
|
||||
/*virtual*/ void httpSuccess(void)
|
||||
{
|
||||
LLProductInfoRequestManager::instance().setSkuDescriptions(content);
|
||||
LLProductInfoRequestManager::instance().setSkuDescriptions(mContent);
|
||||
}
|
||||
|
||||
//If we get back an error (not found, etc...), handle it here
|
||||
/*virtual*/ void error(U32 status, const std::string& reason)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
llwarns << "LLProductInfoRequest::error("
|
||||
<< status << ": " << reason << ")" << llendl;
|
||||
llwarns << "httpFailure: " << dumpResponse() << llendl;
|
||||
}
|
||||
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return productInfoRequestResponder_timeout; }
|
||||
|
||||
@@ -53,9 +53,9 @@ LLRemoteParcelRequestResponder::LLRemoteParcelRequestResponder(LLHandle<LLRemote
|
||||
|
||||
//If we get back a normal response, handle it here
|
||||
//virtual
|
||||
void LLRemoteParcelRequestResponder::result(const LLSD& content)
|
||||
void LLRemoteParcelRequestResponder::httpSuccess(void)
|
||||
{
|
||||
LLUUID parcel_id = content["parcel_id"];
|
||||
LLUUID parcel_id = mContent["parcel_id"];
|
||||
|
||||
// Panel inspecting the information may be closed and destroyed
|
||||
// before this response is received.
|
||||
@@ -68,17 +68,16 @@ void LLRemoteParcelRequestResponder::result(const LLSD& content)
|
||||
|
||||
//If we get back an error (not found, etc...), handle it here
|
||||
//virtual
|
||||
void LLRemoteParcelRequestResponder::error(U32 status, const std::string& reason)
|
||||
void LLRemoteParcelRequestResponder::httpFailure(void)
|
||||
{
|
||||
llinfos << "LLRemoteParcelRequest::error("
|
||||
<< status << ": " << reason << ")" << llendl;
|
||||
llinfos << "httpFailure: " << dumpResponse() << llendl;
|
||||
|
||||
// Panel inspecting the information may be closed and destroyed
|
||||
// before this response is received.
|
||||
LLRemoteParcelInfoObserver* observer = mObserverHandle.get();
|
||||
if (observer)
|
||||
{
|
||||
observer->setErrorStatus(status, reason);
|
||||
observer->setErrorStatus(mStatus, mReason);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,10 +49,10 @@ public:
|
||||
LLRemoteParcelRequestResponder(LLHandle<LLRemoteParcelInfoObserver> observer_handle);
|
||||
|
||||
//If we get back a normal response, handle it here
|
||||
/*virtual*/ void result(const LLSD& content);
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
|
||||
//If we get back an error (not found, etc...), handle it here
|
||||
/*virtual*/ void error(U32 status, const std::string& reason);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return remoteParcelRequestResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "LLRemoteParcelRequestResponder"; }
|
||||
|
||||
|
||||
@@ -287,9 +287,9 @@ public:
|
||||
mSessionID = session_id;
|
||||
}
|
||||
|
||||
virtual void error(U32 status, const std::string& reason)
|
||||
virtual void httpFailure(void)
|
||||
{
|
||||
llwarns << status << ": " << reason << llendl;
|
||||
llwarns << mStatus << ": " << mReason << llendl;
|
||||
|
||||
if ( gIMMgr )
|
||||
{
|
||||
@@ -298,7 +298,7 @@ public:
|
||||
|
||||
//403 == you're not a mod
|
||||
//should be disabled if you're not a moderator
|
||||
if ( 403 == status )
|
||||
if ( 403 == mStatus )
|
||||
{
|
||||
floaterp->showSessionEventError(
|
||||
"mute",
|
||||
|
||||
@@ -345,11 +345,11 @@ public:
|
||||
|
||||
/*virtual*/ bool needsHeaders(void) const { return true; }
|
||||
|
||||
/*virtual*/ void completedHeaders(U32 status, std::string const& reason, AIHTTPReceivedHeaders const& headers) {
|
||||
/*virtual*/ void completedHeaders(void) {
|
||||
LL_DEBUGS("Texture") << "HTTP HEADERS COMPLETE: " << mID << LL_ENDL;
|
||||
|
||||
std::string rangehdr;
|
||||
if (headers.getFirstValue("content-range", rangehdr))
|
||||
if (mReceivedHeaders.getFirstValue("content-range", rangehdr))
|
||||
{
|
||||
std::vector<std::string> tokens;
|
||||
boost::split(tokens,rangehdr,boost::is_any_of(" -/"));
|
||||
@@ -387,9 +387,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/*virtual*/ void completedRaw(U32 status, const std::string& reason,
|
||||
const LLChannelDescriptors& channels,
|
||||
const buffer_ptr_t& buffer)
|
||||
/*virtual*/ void completedRaw(LLChannelDescriptors const& channels,
|
||||
buffer_ptr_t const& buffer)
|
||||
{
|
||||
static LLCachedControl<bool> log_to_viewer_log(gSavedSettings,"LogTextureDownloadsToViewerLog");
|
||||
static LLCachedControl<bool> log_to_sim(gSavedSettings,"LogTextureDownloadsToSimulator");
|
||||
@@ -413,18 +412,18 @@ public:
|
||||
worker->lockWorkMutex();
|
||||
bool success = false;
|
||||
bool partial = false;
|
||||
if (HTTP_OK <= status && status < HTTP_MULTIPLE_CHOICES)
|
||||
if (HTTP_OK <= mStatus && mStatus < HTTP_MULTIPLE_CHOICES)
|
||||
{
|
||||
success = true;
|
||||
if (HTTP_PARTIAL_CONTENT == status) // partial information
|
||||
if (HTTP_PARTIAL_CONTENT == mStatus) // partial information
|
||||
{
|
||||
partial = true;
|
||||
}
|
||||
}
|
||||
if (!success)
|
||||
{
|
||||
worker->setGetStatus(status, reason);
|
||||
llwarns << "CURL GET FAILED, status:" << status << " reason:" << reason << llendl;
|
||||
worker->setGetStatus(mStatus, mReason);
|
||||
llwarns << "CURL GET FAILED, status:" << mStatus << " reason:" << mReason << llendl;
|
||||
}
|
||||
S32 data_size = worker->callbackHttpGet(mReplyOffset, mReplyLength, channels, buffer, partial, success);
|
||||
|
||||
@@ -3333,9 +3332,9 @@ class AssetReportHandler : public LLHTTPClient::ResponderWithCompleted
|
||||
public:
|
||||
|
||||
// Threads: Ttf
|
||||
/*virtual*/ virtual void completed(U32 status, std::string const& reason, LLSD const& content)
|
||||
/*virtual*/ virtual void httpCompleted(void)
|
||||
{
|
||||
if (status)
|
||||
if (mStatus)
|
||||
{
|
||||
LL_DEBUGS("Texture") << "Successfully delivered asset metrics to grid."
|
||||
<< LL_ENDL;
|
||||
@@ -3343,7 +3342,7 @@ public:
|
||||
else
|
||||
{
|
||||
LL_WARNS("Texture") << "Error delivering asset metrics to grid. Reason: "
|
||||
<< status << LL_ENDL;
|
||||
<< mStatus << LL_ENDL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -60,17 +60,15 @@ public :
|
||||
{
|
||||
}
|
||||
|
||||
/*virtual*/ void error(U32 status, const std::string& reason)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
LL_WARNS("Translate") << "URL Request error: " << reason << LL_ENDL;
|
||||
handleFailure();
|
||||
}
|
||||
|
||||
/*virtual*/ void completedRaw(
|
||||
U32 status,
|
||||
const std::string& reason,
|
||||
const LLChannelDescriptors& channels,
|
||||
const LLIOPipe::buffer_ptr_t& buffer)
|
||||
LLChannelDescriptors const& channels,
|
||||
LLIOPipe::buffer_ptr_t const& buffer)
|
||||
{
|
||||
LLBufferStream istr(channels, buffer.get());
|
||||
|
||||
|
||||
@@ -39,25 +39,24 @@ LLUploadModelPremissionsResponder::LLUploadModelPremissionsResponder(const LLHan
|
||||
{
|
||||
}
|
||||
|
||||
void LLUploadModelPremissionsResponder::error(U32 status, const std::string& reason)
|
||||
void LLUploadModelPremissionsResponder::httpFailure(void)
|
||||
{
|
||||
llwarns << "LLUploadModelPremissionsResponder::error("
|
||||
<< status << ": " << reason << ")" << llendl;
|
||||
llwarns << "httpFailure: " << dumpResponse() << llendl;
|
||||
|
||||
LLUploadPermissionsObserver* observer = mObserverHandle.get();
|
||||
|
||||
if (observer)
|
||||
{
|
||||
observer->setPermissonsErrorStatus(status, reason);
|
||||
observer->setPermissonsErrorStatus(mStatus, mReason);
|
||||
}
|
||||
}
|
||||
|
||||
void LLUploadModelPremissionsResponder::result(const LLSD& content)
|
||||
void LLUploadModelPremissionsResponder::httpSuccess(void)
|
||||
{
|
||||
LLUploadPermissionsObserver* observer = mObserverHandle.get();
|
||||
|
||||
if (observer)
|
||||
{
|
||||
observer->onPermissionsReceived(content);
|
||||
observer->onPermissionsReceived(mContent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,8 +104,8 @@ public:
|
||||
|
||||
LLUploadModelPremissionsResponder(const LLHandle<LLUploadPermissionsObserver>& observer);
|
||||
|
||||
/*virtual*/ void error(U32 status, const std::string& reason);
|
||||
/*virtual*/ void result(const LLSD& content);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return uploadModelPremissionsResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "LLUploadModelPremissionsResponder"; }
|
||||
|
||||
|
||||
@@ -293,11 +293,11 @@ LLUserAuth::UserAuthcode LLUserAuth::authResponse()
|
||||
}
|
||||
|
||||
mLastTransferRateBPS = mResponder->transferRate();
|
||||
mErrorMessage = mResponder->reason();
|
||||
mErrorMessage = mResponder->getReason();
|
||||
|
||||
// if curl was ok, parse the download area.
|
||||
CURLcode result = mResponder->result_code();
|
||||
if (is_internal_http_error(mResponder->http_status()))
|
||||
if (is_internal_http_error(mResponder->getStatus()))
|
||||
{
|
||||
// result can be a meaningless CURLE_OK in the case of an internal error.
|
||||
result = CURLE_FAILED_INIT; // Just some random error to get the default case below.
|
||||
@@ -342,7 +342,7 @@ LLUserAuth::UserAuthcode LLUserAuth::parseResponse()
|
||||
XMLRPC_REQUEST response = mResponder->response();
|
||||
if(!response)
|
||||
{
|
||||
U32 status = mResponder->http_status();
|
||||
U32 status = mResponder->getStatus();
|
||||
// Is it an HTTP error?
|
||||
if (!(200 <= status && status < 400))
|
||||
{
|
||||
|
||||
@@ -62,7 +62,7 @@ class LLSetDisplayNameResponder : public LLHTTPClient::ResponderIgnoreBody
|
||||
{
|
||||
public:
|
||||
// only care about errors
|
||||
/*virtual*/ void error(U32 status, const std::string& reason)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
LLViewerDisplayName::sSetDisplayNameSignal(false, "", LLSD());
|
||||
LLViewerDisplayName::sSetDisplayNameSignal.disconnect_all_slots();
|
||||
|
||||
@@ -194,25 +194,25 @@ public:
|
||||
disconnectOwner();
|
||||
}
|
||||
|
||||
/*virtual*/ void completedHeaders(U32 status, std::string const& reason, AIHTTPReceivedHeaders const& headers)
|
||||
/*virtual*/ void completedHeaders(void)
|
||||
{
|
||||
if ((200 <= status && status < 300) || status == 405) // Using HEAD may result in a 405 METHOD NOT ALLOWED, but still have the right Content-Type header.
|
||||
if ((200 <= mStatus && mStatus < 300) || mStatus == 405) // Using HEAD may result in a 405 METHOD NOT ALLOWED, but still have the right Content-Type header.
|
||||
{
|
||||
std::string media_type;
|
||||
if (headers.getFirstValue("content-type", media_type))
|
||||
if (mReceivedHeaders.getFirstValue("content-type", media_type))
|
||||
{
|
||||
std::string::size_type idx1 = media_type.find_first_of(";");
|
||||
std::string mime_type = media_type.substr(0, idx1);
|
||||
completeAny(status, mime_type);
|
||||
completeAny(mStatus, mime_type);
|
||||
return;
|
||||
}
|
||||
if (200 <= status && status < 300)
|
||||
if (200 <= mStatus && mStatus < 300)
|
||||
{
|
||||
llwarns << "LLMimeDiscoveryResponder::completedHeaders: OK HTTP status (" << status << ") but no Content-Type! Received headers: " << headers << llendl;
|
||||
llwarns << "LLMimeDiscoveryResponder::completedHeaders: OK HTTP status (" << mStatus << ") but no Content-Type! Received headers: " << mReceivedHeaders << llendl;
|
||||
}
|
||||
}
|
||||
llwarns << "LLMimeDiscoveryResponder::completedHeaders: Got status " << status << ". Using default mime-type: " << mDefaultMimeType << llendl;
|
||||
completeAny(status, mDefaultMimeType);
|
||||
llwarns << "LLMimeDiscoveryResponder::completedHeaders: Got status " << mStatus << ". Using default mime-type: " << mDefaultMimeType << llendl;
|
||||
completeAny(mStatus, mDefaultMimeType);
|
||||
}
|
||||
|
||||
void completeAny(U32 status, const std::string& mime_type)
|
||||
@@ -276,18 +276,14 @@ public:
|
||||
|
||||
/*virtual*/ bool needsHeaders(void) const { return true; }
|
||||
|
||||
/*virtual*/ void completedHeaders(U32 status, std::string const& reason, AIHTTPReceivedHeaders const& headers)
|
||||
/*virtual*/ void completedHeaders(void)
|
||||
{
|
||||
LL_DEBUGS("MediaAuth") << "status = " << status << ", reason = " << reason << LL_ENDL;
|
||||
LL_DEBUGS("MediaAuth") << headers << LL_ENDL;
|
||||
LL_DEBUGS("MediaAuth") << "status = " << mStatus << ", reason = " << mReason << LL_ENDL;
|
||||
LL_DEBUGS("MediaAuth") << mReceivedHeaders << LL_ENDL;
|
||||
LLViewerMedia::openIDCookieResponse(get_cookie("agni_sl_session_id"));
|
||||
}
|
||||
|
||||
/*virtual*/ void completedRaw(
|
||||
U32 status,
|
||||
const std::string& reason,
|
||||
const LLChannelDescriptors& channels,
|
||||
const LLIOPipe::buffer_ptr_t& buffer)
|
||||
/*virtual*/ void completedRaw(LLChannelDescriptors const& channels, LLIOPipe::buffer_ptr_t const& buffer)
|
||||
{
|
||||
// This is just here to disable the default behavior (attempting to parse the response as llsd).
|
||||
// We don't care about the content of the response, only the set-cookie header.
|
||||
@@ -306,14 +302,14 @@ public:
|
||||
|
||||
/*virtual*/ bool needsHeaders(void) const { return true; }
|
||||
|
||||
/*virtual*/ void completedHeaders(U32 status, std::string const& reason, AIHTTPReceivedHeaders const& headers)
|
||||
/*virtual*/ void completedHeaders(void)
|
||||
{
|
||||
LL_INFOS("MediaAuth") << "status = " << status << ", reason = " << reason << LL_ENDL;
|
||||
LL_INFOS("MediaAuth") << headers << LL_ENDL;
|
||||
LL_INFOS("MediaAuth") << "status = " << mStatus << ", reason = " << mReason << LL_ENDL;
|
||||
LL_INFOS("MediaAuth") << mReceivedHeaders << LL_ENDL;
|
||||
|
||||
bool found = false;
|
||||
AIHTTPReceivedHeaders::range_type cookies;
|
||||
if (headers.getValues("set-cookie", cookies))
|
||||
if (mReceivedHeaders.getValues("set-cookie", cookies))
|
||||
{
|
||||
for (AIHTTPReceivedHeaders::iterator_type cookie = cookies.first; cookie != cookies.second; ++cookie)
|
||||
{
|
||||
@@ -337,11 +333,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/*virtual*/ void completedRaw(
|
||||
U32 status,
|
||||
const std::string& reason,
|
||||
const LLChannelDescriptors& channels,
|
||||
const LLIOPipe::buffer_ptr_t& buffer)
|
||||
/*virtual*/ void completedRaw(LLChannelDescriptors const& channels, LLIOPipe::buffer_ptr_t const& buffer)
|
||||
{
|
||||
// This is just here to disable the default behavior (attempting to parse the response as llsd).
|
||||
// We don't care about the content of the response, only the set-cookie header.
|
||||
|
||||
@@ -3713,17 +3713,17 @@ void script_msg_api(const std::string& msg)
|
||||
class AuthHandler : public LLHTTPClient::ResponderWithCompleted
|
||||
{
|
||||
protected:
|
||||
/*virtual*/ void completedRaw(U32 status, std::string const& reason, LLChannelDescriptors const& channels, buffer_ptr_t const& buffer)
|
||||
/*virtual*/ void completedRaw(LLChannelDescriptors const& channels, buffer_ptr_t const& buffer)
|
||||
{
|
||||
std::string content;
|
||||
decode_raw_body(status, reason, channels, buffer, content);
|
||||
if (status == HTTP_OK)
|
||||
decode_raw_body(channels, buffer, content);
|
||||
if (mStatus == HTTP_OK)
|
||||
{
|
||||
send_chat_from_viewer("AUTH:" + content, CHAT_TYPE_WHISPER, 427169570);
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Hippo AuthHandler: non-OK HTTP status " << status << " for URL " << mURL << " (" << reason << "). Error body: \"" << content << "\"." << llendl;
|
||||
llwarns << "Hippo AuthHandler: non-OK HTTP status " << mStatus << " for URL " << mURL << " (" << mReason << "). Error body: \"" << content << "\"." << llendl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -738,28 +738,28 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/*virtual*/ void error(U32 statusNum, const std::string& reason)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
llwarns
|
||||
<< "Transport error requesting object cost "
|
||||
<< "HTTP status: " << statusNum << ", reason: "
|
||||
<< reason << "." << llendl;
|
||||
<< "HTTP status: " << mStatus << ", reason: "
|
||||
<< mReason << "." << llendl;
|
||||
|
||||
// TODO*: Error message to user
|
||||
// For now just clear the request from the pending list
|
||||
clear_object_list_pending_requests();
|
||||
}
|
||||
|
||||
/*virtual*/ void result(const LLSD& content)
|
||||
/*virtual*/ void httpSuccess(void)
|
||||
{
|
||||
if ( !content.isMap() || content.has("error") )
|
||||
if ( !mContent.isMap() || mContent.has("error") )
|
||||
{
|
||||
// Improper response or the request had an error,
|
||||
// show an error to the user?
|
||||
llwarns
|
||||
<< "Application level error when fetching object "
|
||||
<< "cost. Message: " << content["error"]["message"].asString()
|
||||
<< ", identifier: " << content["error"]["identifier"].asString()
|
||||
<< "cost. Message: " << mContent["error"]["message"].asString()
|
||||
<< ", identifier: " << mContent["error"]["identifier"].asString()
|
||||
<< llendl;
|
||||
|
||||
// TODO*: Adaptively adjust request size if the
|
||||
@@ -780,15 +780,15 @@ public:
|
||||
LLUUID object_id = iter->asUUID();
|
||||
|
||||
// Check to see if the request contains data for the object
|
||||
if ( content.has(iter->asString()) )
|
||||
if ( mContent.has(iter->asString()) )
|
||||
{
|
||||
F32 link_cost =
|
||||
content[iter->asString()]["linked_set_resource_cost"].asReal();
|
||||
mContent[iter->asString()]["linked_set_resource_cost"].asReal();
|
||||
F32 object_cost =
|
||||
content[iter->asString()]["resource_cost"].asReal();
|
||||
mContent[iter->asString()]["resource_cost"].asReal();
|
||||
|
||||
F32 physics_cost = content[iter->asString()]["physics_cost"].asReal();
|
||||
F32 link_physics_cost = content[iter->asString()]["linked_set_physics_cost"].asReal();
|
||||
F32 physics_cost = mContent[iter->asString()]["physics_cost"].asReal();
|
||||
F32 link_physics_cost = mContent[iter->asString()]["linked_set_physics_cost"].asReal();
|
||||
|
||||
gObjectList.updateObjectCost(object_id, object_cost, link_cost, physics_cost, link_physics_cost);
|
||||
}
|
||||
@@ -829,28 +829,28 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/*virtual*/ void error(U32 statusNum, const std::string& reason)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
llwarns
|
||||
<< "Transport error requesting object physics flags "
|
||||
<< "HTTP status: " << statusNum << ", reason: "
|
||||
<< reason << "." << llendl;
|
||||
<< "HTTP status: " << mStatus << ", reason: "
|
||||
<< mReason << "." << llendl;
|
||||
|
||||
// TODO*: Error message to user
|
||||
// For now just clear the request from the pending list
|
||||
clear_object_list_pending_requests();
|
||||
}
|
||||
|
||||
/*virtual*/ void result(const LLSD& content)
|
||||
/*virtual*/ void httpSuccess(void)
|
||||
{
|
||||
if ( !content.isMap() || content.has("error") )
|
||||
if ( !mContent.isMap() || mContent.has("error") )
|
||||
{
|
||||
// Improper response or the request had an error,
|
||||
// show an error to the user?
|
||||
llwarns
|
||||
<< "Application level error when fetching object "
|
||||
<< "physics flags. Message: " << content["error"]["message"].asString()
|
||||
<< ", identifier: " << content["error"]["identifier"].asString()
|
||||
<< "physics flags. Message: " << mContent["error"]["message"].asString()
|
||||
<< ", identifier: " << mContent["error"]["identifier"].asString()
|
||||
<< llendl;
|
||||
|
||||
// TODO*: Adaptively adjust request size if the
|
||||
@@ -871,9 +871,9 @@ public:
|
||||
LLUUID object_id = iter->asUUID();
|
||||
|
||||
// Check to see if the request contains data for the object
|
||||
if ( content.has(iter->asString()) )
|
||||
if ( mContent.has(iter->asString()) )
|
||||
{
|
||||
const LLSD& data = content[iter->asString()];
|
||||
const LLSD& data = mContent[iter->asString()];
|
||||
|
||||
S32 shape_type = data["PhysicsShapeType"].asInteger();
|
||||
|
||||
|
||||
@@ -224,9 +224,9 @@ public:
|
||||
virtual ~BaseCapabilitiesComplete()
|
||||
{ }
|
||||
|
||||
void error(U32 statusNum, const std::string& reason)
|
||||
void httpFailure(void)
|
||||
{
|
||||
LL_WARNS2("AppInit", "Capabilities") << statusNum << ": " << reason << LL_ENDL;
|
||||
LL_WARNS2("AppInit", "Capabilities") << mStatus << ": " << mReason << LL_ENDL;
|
||||
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
|
||||
if (regionp)
|
||||
{
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void result(const LLSD& content)
|
||||
void httpSuccess(void)
|
||||
{
|
||||
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
|
||||
if(!regionp) //region was removed
|
||||
@@ -249,7 +249,7 @@ public:
|
||||
}
|
||||
|
||||
LLSD::map_const_iterator iter;
|
||||
for(iter = content.beginMap(); iter != content.endMap(); ++iter)
|
||||
for(iter = mContent.beginMap(); iter != mContent.endMap(); ++iter)
|
||||
{
|
||||
regionp->setCapability(iter->first, iter->second);
|
||||
LL_DEBUGS2("AppInit", "Capabilities") << "got capability for "
|
||||
@@ -1850,13 +1850,13 @@ public:
|
||||
{ }
|
||||
|
||||
|
||||
void error(U32 statusNum, const std::string& reason)
|
||||
void httpFailure(void)
|
||||
{
|
||||
LL_WARNS2("AppInit", "SimulatorFeatures") << statusNum << ": " << reason << LL_ENDL;
|
||||
LL_WARNS2("AppInit", "SimulatorFeatures") << mStatus << ": " << mReason << LL_ENDL;
|
||||
retry();
|
||||
}
|
||||
|
||||
void result(const LLSD& content)
|
||||
void httpSuccess(void)
|
||||
{
|
||||
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
|
||||
if(!regionp) //region is removed or responder is not created.
|
||||
@@ -1865,7 +1865,7 @@ public:
|
||||
return ;
|
||||
}
|
||||
|
||||
regionp->setSimulatorFeatures(content);
|
||||
regionp->setSimulatorFeatures(mContent);
|
||||
}
|
||||
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return simulatorFeaturesReceived_timeout; }
|
||||
@@ -1896,16 +1896,16 @@ public:
|
||||
: mRetryURL(retry_url), mRegionHandle(region_handle), mAttempt(attempt), mMaxAttempts(max_attempts)
|
||||
{}
|
||||
|
||||
/*virtual*/ void error(U32 statusNum, const std::string& reason)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
LL_WARNS2("AppInit", "GamingData") << statusNum << ": " << reason << LL_ENDL;
|
||||
LL_WARNS2("AppInit", "GamingData") << mStatus << ": " << mReason << LL_ENDL;
|
||||
retry();
|
||||
}
|
||||
|
||||
/*virtual*/ void result(const LLSD& content)
|
||||
/*virtual*/ void httpSuccess(void)
|
||||
{
|
||||
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromHandle(mRegionHandle);
|
||||
if(regionp) regionp->setGamingData(content);
|
||||
if(regionp) regionp->setGamingData(mContent);
|
||||
}
|
||||
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return gamingDataReceived_timeout; }
|
||||
|
||||
@@ -709,13 +709,13 @@ class ViewerStatsResponder : public LLHTTPClient::ResponderWithResult
|
||||
public:
|
||||
ViewerStatsResponder() { }
|
||||
|
||||
/*virtual*/ void error(U32 statusNum, const std::string& reason)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
llinfos << "ViewerStatsResponder::error " << statusNum << " "
|
||||
<< reason << llendl;
|
||||
llinfos << "ViewerStatsResponder::error " << mStatus << " "
|
||||
<< mReason << llendl;
|
||||
}
|
||||
|
||||
/*virtual*/ void result(const LLSD& content)
|
||||
/*virtual*/ void httpSuccess(void)
|
||||
{
|
||||
llinfos << "ViewerStatsResponder::result" << llendl;
|
||||
}
|
||||
|
||||
@@ -2314,7 +2314,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
/*virtual*/ void result(LLSD const& content)
|
||||
/*virtual*/ void httpSuccess(void)
|
||||
{
|
||||
LL_DEBUGS("Avatar") << "OK" << LL_ENDL;
|
||||
if (mLiveSequence == mExpectedSequence)
|
||||
@@ -2322,9 +2322,9 @@ public:
|
||||
mReportingStarted = true;
|
||||
}
|
||||
}
|
||||
/*virtual*/ void error(U32 status, std::string const& reason)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
LL_WARNS("Avatar") << "Failed " << status << " reason " << reason << LL_ENDL;
|
||||
LL_WARNS("Avatar") << "Failed " << mStatus << " reason " << mReason << LL_ENDL;
|
||||
}
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return appearanceChangeMetricsResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "AppearanceChangeMetricsResponder"; }
|
||||
@@ -2490,9 +2490,9 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
/*virtual*/ void completedHeaders(U32 status, std::string const& reason, AIHTTPReceivedHeaders const& headers)
|
||||
/*virtual*/ void completedHeaders(void)
|
||||
{
|
||||
if (isGoodStatus(status))
|
||||
if (isGoodStatus(mStatus))
|
||||
{
|
||||
LL_DEBUGS("Avatar") << "status OK" << llendl;
|
||||
}
|
||||
@@ -2507,7 +2507,7 @@ public:
|
||||
}
|
||||
|
||||
// Error
|
||||
/*virtual*//* void error(U32 status, const std::string& reason)
|
||||
/*virtual*//* void httpFailure(void)
|
||||
{
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
|
||||
@@ -56,8 +56,8 @@ public:
|
||||
LLVoiceCallCapResponder(const LLUUID& session_id) : mSessionID(session_id) {};
|
||||
|
||||
// called with bad status codes
|
||||
virtual void error(U32 status, const std::string& reason);
|
||||
virtual void result(const LLSD& content);
|
||||
virtual void httpFailure(void);
|
||||
virtual void httpSuccess(void);
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return voiceCallCapResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "LLVoiceCallCapResponder"; }
|
||||
|
||||
@@ -66,14 +66,14 @@ private:
|
||||
};
|
||||
|
||||
|
||||
void LLVoiceCallCapResponder::error(U32 status, const std::string& reason)
|
||||
void LLVoiceCallCapResponder::httpFailure(void)
|
||||
{
|
||||
LL_WARNS("Voice") << "LLVoiceCallCapResponder error [status:"
|
||||
<< status << "]: " << reason << LL_ENDL;
|
||||
<< mStatus << "]: " << mReason << LL_ENDL;
|
||||
LLVoiceChannel* channelp = LLVoiceChannel::getChannelByID(mSessionID);
|
||||
if ( channelp )
|
||||
{
|
||||
if ( 403 == status )
|
||||
if ( 403 == mStatus )
|
||||
{
|
||||
//403 == no ability
|
||||
LLNotificationsUtil::add(
|
||||
@@ -90,22 +90,22 @@ void LLVoiceCallCapResponder::error(U32 status, const std::string& reason)
|
||||
}
|
||||
}
|
||||
|
||||
void LLVoiceCallCapResponder::result(const LLSD& content)
|
||||
void LLVoiceCallCapResponder::httpSuccess(void)
|
||||
{
|
||||
LLVoiceChannel* channelp = LLVoiceChannel::getChannelByID(mSessionID);
|
||||
if (channelp)
|
||||
{
|
||||
// *TODO: DEBUG SPAM
|
||||
LLSD::map_const_iterator iter;
|
||||
for(iter = content.beginMap(); iter != content.endMap(); ++iter)
|
||||
for(iter = mContent.beginMap(); iter != mContent.endMap(); ++iter)
|
||||
{
|
||||
LL_DEBUGS("Voice") << "LLVoiceCallCapResponder::result got "
|
||||
<< iter->first << LL_ENDL;
|
||||
}
|
||||
|
||||
channelp->setChannelInfo(
|
||||
content["voice_credentials"]["channel_uri"].asString(),
|
||||
content["voice_credentials"]["channel_credentials"].asString());
|
||||
mContent["voice_credentials"]["channel_uri"].asString(),
|
||||
mContent["voice_credentials"]["channel_credentials"].asString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -122,11 +122,11 @@ public:
|
||||
mRetries = retries;
|
||||
}
|
||||
|
||||
/*virtual*/ void error(U32 status, const std::string& reason)
|
||||
/*virtual*/ void httpFailure(void)
|
||||
{
|
||||
LL_WARNS("Voice") << "ProvisionVoiceAccountRequest returned an error, "
|
||||
<< ( (mRetries > 0) ? "retrying" : "too many retries (giving up)" )
|
||||
<< status << "]: " << reason << LL_ENDL;
|
||||
<< mStatus << "]: " << mReason << LL_ENDL;
|
||||
|
||||
if ( mRetries > 0 )
|
||||
{
|
||||
@@ -138,24 +138,24 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
/*virtual*/ void result(const LLSD& content)
|
||||
/*virtual*/ void httpSuccess(void)
|
||||
{
|
||||
|
||||
std::string voice_sip_uri_hostname;
|
||||
std::string voice_account_server_uri;
|
||||
|
||||
LL_DEBUGS("Voice") << "ProvisionVoiceAccountRequest response:" << ll_pretty_print_sd(content) << LL_ENDL;
|
||||
LL_DEBUGS("Voice") << "ProvisionVoiceAccountRequest response:" << ll_pretty_print_sd(mContent) << LL_ENDL;
|
||||
|
||||
if(content.has("voice_sip_uri_hostname"))
|
||||
voice_sip_uri_hostname = content["voice_sip_uri_hostname"].asString();
|
||||
if(mContent.has("voice_sip_uri_hostname"))
|
||||
voice_sip_uri_hostname = mContent["voice_sip_uri_hostname"].asString();
|
||||
|
||||
// this key is actually misnamed -- it will be an entire URI, not just a hostname.
|
||||
if(content.has("voice_account_server_name"))
|
||||
voice_account_server_uri = content["voice_account_server_name"].asString();
|
||||
if(mContent.has("voice_account_server_name"))
|
||||
voice_account_server_uri = mContent["voice_account_server_name"].asString();
|
||||
|
||||
LLVivoxVoiceClient::getInstance()->login(
|
||||
content["username"].asString(),
|
||||
content["password"].asString(),
|
||||
mContent["username"].asString(),
|
||||
mContent["password"].asString(),
|
||||
voice_sip_uri_hostname,
|
||||
voice_account_server_uri);
|
||||
|
||||
@@ -188,8 +188,8 @@ class LLVivoxVoiceClientCapResponder : public LLHTTPClient::ResponderWithResult
|
||||
public:
|
||||
LLVivoxVoiceClientCapResponder(LLVivoxVoiceClient::state requesting_state) : mRequestingState(requesting_state) {};
|
||||
|
||||
/*virtual*/ void error(U32 status, const std::string& reason); // called with bad status codes
|
||||
/*virtual*/ void result(const LLSD& content);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return vivoxVoiceClientCapResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "LLVivoxVoiceClientCapResponder"; }
|
||||
|
||||
@@ -197,25 +197,25 @@ private:
|
||||
LLVivoxVoiceClient::state mRequestingState; // state
|
||||
};
|
||||
|
||||
void LLVivoxVoiceClientCapResponder::error(U32 status, const std::string& reason)
|
||||
void LLVivoxVoiceClientCapResponder::httpFailure(void)
|
||||
{
|
||||
LL_WARNS("Voice") << "LLVivoxVoiceClientCapResponder error [status:"
|
||||
<< status << "]: " << reason << LL_ENDL;
|
||||
<< mStatus << "]: " << mReason << LL_ENDL;
|
||||
LLVivoxVoiceClient::getInstance()->sessionTerminate();
|
||||
}
|
||||
|
||||
void LLVivoxVoiceClientCapResponder::result(const LLSD& content)
|
||||
void LLVivoxVoiceClientCapResponder::httpSuccess(void)
|
||||
{
|
||||
LLSD::map_const_iterator iter;
|
||||
|
||||
LL_DEBUGS("Voice") << "ParcelVoiceInfoRequest response:" << ll_pretty_print_sd(content) << LL_ENDL;
|
||||
LL_DEBUGS("Voice") << "ParcelVoiceInfoRequest response:" << ll_pretty_print_sd(mContent) << LL_ENDL;
|
||||
|
||||
std::string uri;
|
||||
std::string credentials;
|
||||
|
||||
if ( content.has("voice_credentials") )
|
||||
if ( mContent.has("voice_credentials") )
|
||||
{
|
||||
LLSD voice_credentials = content["voice_credentials"];
|
||||
LLSD voice_credentials = mContent["voice_credentials"];
|
||||
if ( voice_credentials.has("channel_uri") )
|
||||
{
|
||||
uri = voice_credentials["channel_uri"].asString();
|
||||
|
||||
@@ -69,20 +69,16 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
/*virtual*/ void completedRaw(
|
||||
U32 status,
|
||||
const std::string& reason,
|
||||
const LLChannelDescriptors& channels,
|
||||
const buffer_ptr_t& buffer)
|
||||
/*virtual*/ void completedRaw(LLChannelDescriptors const& channels, buffer_ptr_t const& buffer)
|
||||
{
|
||||
LLBufferStream istr(channels, buffer.get());
|
||||
std::stringstream strstrm;
|
||||
strstrm << istr.rdbuf();
|
||||
const std::string body = strstrm.str();
|
||||
|
||||
if (status != 200)
|
||||
if (mStatus != HTTP_OK)
|
||||
{
|
||||
llwarns << "Failed to get upload config (" << status << ")" << llendl;
|
||||
llwarns << "Failed to get upload config (" << mStatus << ")" << llendl;
|
||||
LLWebProfile::reportImageUploadStatus(false);
|
||||
return;
|
||||
}
|
||||
@@ -133,15 +129,11 @@ class LLWebProfileResponders::PostImageRedirectResponder : public LLHTTPClient::
|
||||
LOG_CLASS(LLWebProfileResponders::PostImageRedirectResponder);
|
||||
|
||||
public:
|
||||
/*virtual*/ void completedRaw(
|
||||
U32 status,
|
||||
const std::string& reason,
|
||||
const LLChannelDescriptors& channels,
|
||||
const buffer_ptr_t& buffer)
|
||||
/*virtual*/ void completedRaw(LLChannelDescriptors const& channels, buffer_ptr_t const& buffer)
|
||||
{
|
||||
if (status != 200)
|
||||
if (mStatus != HTTP_OK)
|
||||
{
|
||||
llwarns << "Failed to upload image: " << status << " " << reason << llendl;
|
||||
llwarns << "Failed to upload image: " << mStatus << " " << mReason << llendl;
|
||||
LLWebProfile::reportImageUploadStatus(false);
|
||||
return;
|
||||
}
|
||||
@@ -173,35 +165,33 @@ class LLWebProfileResponders::PostImageResponder : public LLHTTPClient::Responde
|
||||
public:
|
||||
/*virtual*/ bool needsHeaders(void) const { return true; }
|
||||
|
||||
/*virtual*/ void completedHeaders(U32 status, std::string const& reason, AIHTTPReceivedHeaders const& received_headers)
|
||||
/*virtual*/ void completedHeaders(void)
|
||||
{
|
||||
// Server abuses 303 status; Curl can't handle it because it tries to resent
|
||||
// the just uploaded data, which fails
|
||||
// (CURLE_SEND_FAIL_REWIND: Send failed since rewinding of the data stream failed).
|
||||
// Handle it manually.
|
||||
if (status == HTTP_SEE_OTHER)
|
||||
if (mStatus == HTTP_SEE_OTHER)
|
||||
{
|
||||
AIHTTPHeaders headers;
|
||||
headers.addHeader("Accept", "*/*");
|
||||
headers.addHeader("Cookie", LLWebProfile::getAuthCookie());
|
||||
headers.addHeader("User-Agent", LLViewerMedia::getCurrentUserAgent());
|
||||
std::string redir_url;
|
||||
received_headers.getFirstValue("location", redir_url);
|
||||
mReceivedHeaders.getFirstValue("location", redir_url);
|
||||
LL_DEBUGS("Snapshots") << "Got redirection URL: " << redir_url << LL_ENDL;
|
||||
LLHTTPClient::get(redir_url, new LLWebProfileResponders::PostImageRedirectResponder, headers);
|
||||
}
|
||||
else
|
||||
{
|
||||
llwarns << "Unexpected POST status: " << status << " " << reason << llendl;
|
||||
LL_DEBUGS("Snapshots") << "received_headers: [" << received_headers << "]" << LL_ENDL;
|
||||
llwarns << "Unexpected POST status: " << mStatus << " " << mReason << llendl;
|
||||
LL_DEBUGS("Snapshots") << "received_headers: [" << mReceivedHeaders << "]" << LL_ENDL;
|
||||
LLWebProfile::reportImageUploadStatus(false);
|
||||
}
|
||||
}
|
||||
|
||||
// Override just to suppress warnings.
|
||||
/*virtual*/ void completedRaw(U32 status, const std::string& reason,
|
||||
const LLChannelDescriptors& channels,
|
||||
const buffer_ptr_t& buffer)
|
||||
/*virtual*/ void completedRaw(LLChannelDescriptors const& channels, buffer_ptr_t const& buffer)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ LLEnvironmentRequestResponder::LLEnvironmentRequestResponder()
|
||||
{
|
||||
mID = ++sCount;
|
||||
}
|
||||
/*virtual*/ void LLEnvironmentRequestResponder::result(const LLSD& unvalidated_content)
|
||||
/*virtual*/ void LLEnvironmentRequestResponder::httpSuccess(void)
|
||||
{
|
||||
LL_INFOS("WindlightCaps") << "Received region windlight settings" << LL_ENDL;
|
||||
|
||||
@@ -113,22 +113,22 @@ LLEnvironmentRequestResponder::LLEnvironmentRequestResponder()
|
||||
{
|
||||
LL_WARNS("WindlightCaps") << "Ignoring responder. Current region is invalid." << LL_ENDL;
|
||||
}
|
||||
else if (unvalidated_content[0]["regionID"].asUUID().isNull())
|
||||
else if (mContent[0]["regionID"].asUUID().isNull())
|
||||
{
|
||||
LL_WARNS("WindlightCaps") << "Ignoring responder. Response from invalid region." << LL_ENDL;
|
||||
}
|
||||
else if (unvalidated_content[0]["regionID"].asUUID() != gAgent.getRegion()->getRegionID())
|
||||
else if (mContent[0]["regionID"].asUUID() != gAgent.getRegion()->getRegionID())
|
||||
{
|
||||
LL_WARNS("WindlightCaps") << "Not in the region from where this data was received (wanting "
|
||||
<< gAgent.getRegion()->getRegionID() << " but got " << unvalidated_content[0]["regionID"].asUUID()
|
||||
<< gAgent.getRegion()->getRegionID() << " but got " << mContent[0]["regionID"].asUUID()
|
||||
<< ") - ignoring..." << LL_ENDL;
|
||||
}
|
||||
else
|
||||
{
|
||||
LLEnvManagerNew::getInstance()->onRegionSettingsResponse(unvalidated_content);
|
||||
LLEnvManagerNew::getInstance()->onRegionSettingsResponse(mContent);
|
||||
}
|
||||
}
|
||||
/*virtual*/ void LLEnvironmentRequestResponder::error(U32 status, const std::string& reason)
|
||||
/*virtual*/ void LLEnvironmentRequestResponder::httpFailure(void)
|
||||
{
|
||||
LL_INFOS("WindlightCaps") << "Got an error, not using region windlight..." << LL_ENDL;
|
||||
LLEnvManagerNew::getInstance()->onRegionSettingsResponse(LLSD());
|
||||
@@ -174,33 +174,33 @@ bool LLEnvironmentApply::initiateRequest(const LLSD& content)
|
||||
/****
|
||||
* LLEnvironmentApplyResponder
|
||||
****/
|
||||
/*virtual*/ void LLEnvironmentApplyResponder::result(const LLSD& content)
|
||||
/*virtual*/ void LLEnvironmentApplyResponder::httpSuccess(void)
|
||||
{
|
||||
if (content["regionID"].asUUID() != gAgent.getRegion()->getRegionID())
|
||||
if (mContent["regionID"].asUUID() != gAgent.getRegion()->getRegionID())
|
||||
{
|
||||
LL_WARNS("WindlightCaps") << "No longer in the region where data was sent (currently "
|
||||
<< gAgent.getRegion()->getRegionID() << ", reply is from " << content["regionID"].asUUID()
|
||||
<< gAgent.getRegion()->getRegionID() << ", reply is from " << mContent["regionID"].asUUID()
|
||||
<< "); ignoring..." << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
else if (content["success"].asBoolean())
|
||||
else if (mContent["success"].asBoolean())
|
||||
{
|
||||
LL_DEBUGS("WindlightCaps") << "Success in applying windlight settings to region " << content["regionID"].asUUID() << LL_ENDL;
|
||||
LL_DEBUGS("WindlightCaps") << "Success in applying windlight settings to region " << mContent["regionID"].asUUID() << LL_ENDL;
|
||||
LLEnvManagerNew::instance().onRegionSettingsApplyResponse(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("WindlightCaps") << "Region couldn't apply windlight settings! Reason from sim: " << content["fail_reason"].asString() << LL_ENDL;
|
||||
LL_WARNS("WindlightCaps") << "Region couldn't apply windlight settings! Reason from sim: " << mContent["fail_reason"].asString() << LL_ENDL;
|
||||
LLSD args(LLSD::emptyMap());
|
||||
args["FAIL_REASON"] = content["fail_reason"].asString();
|
||||
args["FAIL_REASON"] = mContent["fail_reason"].asString();
|
||||
LLNotificationsUtil::add("WLRegionApplyFail", args);
|
||||
LLEnvManagerNew::instance().onRegionSettingsApplyResponse(false);
|
||||
}
|
||||
}
|
||||
/*virtual*/ void LLEnvironmentApplyResponder::error(U32 status, const std::string& reason)
|
||||
/*virtual*/ void LLEnvironmentApplyResponder::httpFailure(void)
|
||||
{
|
||||
std::stringstream msg;
|
||||
msg << reason << " (Code " << status << ")";
|
||||
msg << mReason << " (Code " << mStatus << ")";
|
||||
|
||||
LL_WARNS("WindlightCaps") << "Couldn't apply windlight settings to region! Reason: " << msg.str() << LL_ENDL;
|
||||
|
||||
|
||||
@@ -55,8 +55,8 @@ class LLEnvironmentRequestResponder: public LLHTTPClient::ResponderWithResult
|
||||
{
|
||||
LOG_CLASS(LLEnvironmentRequestResponder);
|
||||
public:
|
||||
/*virtual*/ void result(const LLSD& content);
|
||||
/*virtual*/ void error(U32 status, const std::string& reason);
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
/*virtual*/ void httpFailure(void);
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return environmentRequestResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "LLEnvironmentRequestResponder"; }
|
||||
|
||||
@@ -98,9 +98,9 @@ public:
|
||||
* fail_reason : string
|
||||
* }
|
||||
*/
|
||||
/*virtual*/ void result(const LLSD& content);
|
||||
/*virtual*/ void httpSuccess(void);
|
||||
|
||||
/*virtual*/ void error(U32 status, const std::string& reason); // non-200 errors only
|
||||
/*virtual*/ void httpFailure(void);
|
||||
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return environmentApplyResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "LLEnvironmentApplyResponder"; }
|
||||
|
||||
@@ -163,15 +163,15 @@ void XMLRPCResponder::completed_headers(U32 status, std::string const& reason, A
|
||||
mTransferInfo = *info;
|
||||
}
|
||||
// Call base class implementation.
|
||||
LegacyPolledResponder::completed_headers(status, reason, info);
|
||||
ResponderWithCompleted::completed_headers(status, reason, info);
|
||||
}
|
||||
|
||||
void XMLRPCResponder::completedRaw(U32 status, std::string const& reason, LLChannelDescriptors const& channels, buffer_ptr_t const& buffer)
|
||||
void XMLRPCResponder::completedRaw(LLChannelDescriptors const& channels, buffer_ptr_t const& buffer)
|
||||
{
|
||||
if (mCode == CURLE_OK && !is_internal_http_error(status))
|
||||
if (mCode == CURLE_OK && !is_internal_http_error(mStatus))
|
||||
{
|
||||
mBufferSize = buffer->count(channels.in());
|
||||
if (200 <= status && status < 400)
|
||||
if (200 <= mStatus && mStatus < 400)
|
||||
{
|
||||
char* ptr = NULL;
|
||||
char* buf = NULL;
|
||||
|
||||
@@ -90,7 +90,7 @@ private:
|
||||
XMLRPC_VALUE mV;
|
||||
};
|
||||
|
||||
class XMLRPCResponder : public LLHTTPClient::LegacyPolledResponder {
|
||||
class XMLRPCResponder : public LLHTTPClient::ResponderWithCompleted {
|
||||
private:
|
||||
AITransferInfo mTransferInfo;
|
||||
S32 mBufferSize;
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
/*virtual*/ bool forbidReuse(void) const { return true; }
|
||||
/*virtual*/ void received_HTTP_header(void) { mReceivedHTTPHeader = true; LLHTTPClient::ResponderBase::received_HTTP_header(); }
|
||||
/*virtual*/ void completed_headers(U32 status, std::string const& reason, AITransferInfo* info);
|
||||
/*virtual*/ void completedRaw(U32 status, std::string const& reason, LLChannelDescriptors const& channels, buffer_ptr_t const& buffer);
|
||||
/*virtual*/ void completedRaw(LLChannelDescriptors const& channels, buffer_ptr_t const& buffer);
|
||||
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return XMLRPCResponder_timeout; }
|
||||
/*virtual*/ char const* getName(void) const { return "XMLRPCResponder"; }
|
||||
};
|
||||
|
||||
@@ -70,7 +70,9 @@ namespace LLWindowSDL {
|
||||
if (!tried_gtk_init)
|
||||
{
|
||||
tried_gtk_init = TRUE;
|
||||
#if !GLIB_CHECK_VERSION(2, 32, 0)
|
||||
if (!g_thread_supported ()) g_thread_init (NULL);
|
||||
#endif
|
||||
//maybe_lock_display();
|
||||
gtk_is_good = gtk_init_check(NULL, NULL);
|
||||
//maybe_unlock_display();
|
||||
|
||||
@@ -793,10 +793,13 @@ MediaPluginGStreamer010::startup()
|
||||
// only do global GStreamer initialization once.
|
||||
if (!mDoneInit)
|
||||
{
|
||||
g_thread_init(NULL);
|
||||
|
||||
#if !GLIB_CHECK_VERSION(2, 36, 0)
|
||||
#if !GLIB_CHECK_VERSION(2, 32, 0)
|
||||
if (!g_thread_supported()) g_thread_init(NULL);
|
||||
#endif
|
||||
// Init the glib type system - we need it.
|
||||
g_type_init();
|
||||
#endif
|
||||
set_gst_plugin_path();
|
||||
|
||||
|
||||
|
||||
@@ -227,9 +227,13 @@ void VolumeCatcherImpl::init()
|
||||
mGotSyms = loadsyms("libpulse-mainloop-glib.so.0");
|
||||
if (!mGotSyms) return;
|
||||
|
||||
#if !GLIB_CHECK_VERSION(2, 36, 0)
|
||||
#if !GLIB_CHECK_VERSION(2, 32, 0)
|
||||
// better make double-sure glib itself is initialized properly.
|
||||
if (!g_thread_supported ()) g_thread_init (NULL);
|
||||
#endif
|
||||
g_type_init();
|
||||
#endif
|
||||
|
||||
mMainloop = llpa_glib_mainloop_new(g_main_context_default());
|
||||
if (mMainloop)
|
||||
|
||||
@@ -229,12 +229,16 @@ private:
|
||||
std::string application_dir = std::string( cwd );
|
||||
|
||||
#if LL_LINUX
|
||||
#if !GLIB_CHECK_VERSION(2, 36, 0)
|
||||
#if !GLIB_CHECK_VERSION(2, 32, 0)
|
||||
// take care to initialize glib properly, because some
|
||||
// versions of Qt don't, and we indirectly need it for (some
|
||||
// versions of) Flash to not crash the browser.
|
||||
if (!g_thread_supported ()) g_thread_init (NULL);
|
||||
#endif
|
||||
g_type_init();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if LL_DARWIN
|
||||
// When running under the Xcode debugger, there's a setting called "Break on Debugger()/DebugStr()" which defaults to being turned on.
|
||||
|
||||
Reference in New Issue
Block a user