Parcel Media and Viewer Parcel Mgr to generic coroutines.

master
Rider Linden 2015-05-18 14:15:51 -07:00
parent 46a86ddb7a
commit 5fbd84a210
2 changed files with 14 additions and 4 deletions

View File

@ -43,6 +43,7 @@
//#include "llfirstuse.h"
#include "llpluginclassmedia.h"
#include "llviewertexture.h"
#include "llcorehttputil.h"
// Static Variables
@ -457,6 +458,7 @@ void LLViewerParcelMedia::processParcelMediaUpdate( LLMessageSystem *msg, void *
}
// Static
/////////////////////////////////////////////////////////////////////////////////////////
// *TODO: I can not find any active code where this method is called...
void LLViewerParcelMedia::sendMediaNavigateMessage(const std::string& url)
{
std::string region_url = gAgent.getRegion()->getCapability("ParcelNavigateMedia");
@ -467,7 +469,9 @@ void LLViewerParcelMedia::sendMediaNavigateMessage(const std::string& url)
body["agent-id"] = gAgent.getID();
body["local-id"] = LLViewerParcelMgr::getInstance()->getAgentParcel()->getLocalID();
body["url"] = url;
LLHTTPClient::post(region_url, body, new LLHTTPClient::Responder);
LLCoreHttpUtil::HttpCoroutineAdapter::messageHttpPost(region_url, body,
"Media Navigation sent to sim.", "Media Navigation failed to send to sim.");
}
else
{

View File

@ -67,6 +67,7 @@
#include "roles_constants.h"
#include "llweb.h"
#include "llvieweraudio.h"
#include "llcorehttputil.h"
const F32 PARCEL_COLLISION_DRAW_SECS = 1.f;
@ -1278,10 +1279,13 @@ const std::string& LLViewerParcelMgr::getAgentParcelName() const
void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel, bool use_agent_region)
{
if(!parcel) return;
if(!parcel)
return;
LLViewerRegion *region = use_agent_region ? gAgent.getRegion() : LLWorld::getInstance()->getRegionFromPosGlobal( mWestSouth );
if (!region) return;
if (!region)
return;
//LL_INFOS() << "found region: " << region->getName() << LL_ENDL;
LLSD body;
@ -1294,7 +1298,9 @@ void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel, bool use_ag
parcel->packMessage(body);
LL_INFOS() << "Sending parcel properties update via capability to: "
<< url << LL_ENDL;
LLHTTPClient::post(url, body, new LLHTTPClient::Responder());
LLCoreHttpUtil::HttpCoroutineAdapter::messageHttpPost(url, body,
"Parcel Properties sent to sim.", "Parcel Properties failed to send to sim.");
}
else
{