From 378c076d1df5d911e07959638fbd61a9094384d2 Mon Sep 17 00:00:00 2001 From: prep Date: Thu, 17 Nov 2011 13:32:04 -0500 Subject: WIP: navmesh station posts to a url, responder receives llsd and then has the llpathing library extract and render the navmesh (if desired). --- indra/newview/llnavmeshstation.cpp | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) (limited to 'indra/newview/llnavmeshstation.cpp') diff --git a/indra/newview/llnavmeshstation.cpp b/indra/newview/llnavmeshstation.cpp index 3a29730328..6f491c34c9 100644 --- a/indra/newview/llnavmeshstation.cpp +++ b/indra/newview/llnavmeshstation.cpp @@ -30,6 +30,7 @@ #include "LLPathingLib.h"//prep# fixme #include "llagent.h" #include "llviewerregion.h" +#include "llsdutil.h" //=============================================================================== LLNavMeshStation::LLNavMeshStation() { @@ -111,7 +112,17 @@ public: if ( pObserver ) { llinfos<<"Do something immensely important w/content"<extractNavMeshSrcFromLLSD( content ); + llinfos<<"LLsd buffer"<extractNavMeshSrcFromLLSD( stuff ); + } + else + { + llwarns<<"no mesh data "<& observerHandle ) { - mCurlRequest = new LLCurlRequest(); - if ( mNavMeshDownloadURL.empty() ) { llinfos << "Unable to upload navmesh because of missing URL" << llendl; } else - { - LLCurlRequest::headers_t headers; + { LLSD data; data["agent_id"] = gAgent.getID(); data["region_id"] = gAgent.getRegion()->getRegionID(); - mCurlRequest->post( mNavMeshDownloadURL, headers, data, - new LLNavMeshDownloadResponder( observerHandle ) ); - do - { - mCurlRequest->process(); - //sleep for 10ms to prevent eating a whole core - apr_sleep(10000); - } while ( mCurlRequest->getQueued() > 0 ); + LLHTTPClient::post(mNavMeshDownloadURL, data, new LLNavMeshDownloadResponder( observerHandle ) ); } - - delete mCurlRequest; - - mCurlRequest = NULL; } //=============================================================================== \ No newline at end of file -- cgit v1.3