diff options
author | Rider Linden <none@none> | 2015-04-09 16:46:41 -0700 |
---|---|---|
committer | Rider Linden <none@none> | 2015-04-09 16:46:41 -0700 |
commit | e28a5b6eadd4c38498665b44f1c7e197615139f2 (patch) | |
tree | aa623b21c1a37c265962ee6a2c876783715c7c13 /indra/llmessage | |
parent | fb082a185d9988a5ced8b92c9d2a89e24739cbcf (diff) |
Added LL_WARNS_IF to llerror.h
If the coro is given something other than a map from the http then move the return into a body section.
Changed windlight to use a coroutine and the new LLCore::Http libarary.
Extra comments into Event Polling.
Diffstat (limited to 'indra/llmessage')
-rw-r--r-- | indra/llmessage/llcorehttputil.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp index dd9cb2032a..a32c4cad22 100644 --- a/indra/llmessage/llcorehttputil.cpp +++ b/indra/llmessage/llcorehttputil.cpp @@ -241,12 +241,19 @@ void HttpCoroHandler::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRespons } if (result.isUndefined()) - { - // If we've gotten to this point and the result LLSD is still undefined + { // If we've gotten to this point and the result LLSD is still undefined // either there was an issue deserializing the body or the response was // blank. Create an empty map to hold the result either way. result = LLSD::emptyMap(); } + else if (!result.isMap()) + { // The results are not themselves a map. Move them down so that + // this method can return a map to the caller. + // *TODO: Should it always do this? + LLSD newResult = LLSD::emptyMap(); + newResult["content"] = result; + result = newResult; + } } buildStatusEntry(response, status, result); |