From e28a5b6eadd4c38498665b44f1c7e197615139f2 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 9 Apr 2015 16:46:41 -0700 Subject: 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. --- indra/llmessage/llcorehttputil.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'indra/llmessage') 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); -- cgit v1.2.3