WIP: work on rewriting LLURLRequest
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
// ********************************************************************
|
||||
|
||||
|
||||
class HippoRestComplete : public LLURLRequestComplete
|
||||
class HippoRestComplete /* AIFIXME: public LLURLRequestComplete*/
|
||||
{
|
||||
public:
|
||||
HippoRestComplete(HippoRestHandler *handler) :
|
||||
@@ -40,6 +40,7 @@ class HippoRestComplete : public LLURLRequestComplete
|
||||
mHandler->addHeader(header, value);
|
||||
}
|
||||
|
||||
#if 0 // AIFIXME: doesn't compile
|
||||
// Always called on request completion, prior to complete
|
||||
void httpStatus(U32 status, const std::string& reason)
|
||||
{
|
||||
@@ -52,6 +53,7 @@ class HippoRestComplete : public LLURLRequestComplete
|
||||
{
|
||||
mHandler->handle(mStatus, mReason, channels, buffer);
|
||||
}
|
||||
#endif
|
||||
|
||||
private:
|
||||
HippoRestHandler *mHandler;
|
||||
@@ -265,7 +267,7 @@ static void request(const std::string &url,
|
||||
llwarns << "Failed to create LLURLRequest: " << error.what() << llendl;
|
||||
return;
|
||||
}
|
||||
req->setSSLVerifyCallback(LLHTTPClient::getCertVerifyCallback(), (void *)req);
|
||||
//AIFIXME: req->setSSLVerifyCallback(LLHTTPClient::getCertVerifyCallback(), (void *)req);
|
||||
|
||||
/*
|
||||
// Insert custom headers if the caller sent any
|
||||
@@ -300,7 +302,7 @@ static void request(const std::string &url,
|
||||
req->addHeader(accept.c_str());
|
||||
}
|
||||
|
||||
req->setCallback(new HippoRestComplete(handler));
|
||||
//AIFIXME: req->setCallback(new HippoRestComplete(handler));
|
||||
|
||||
if ((method == LLURLRequest::HTTP_PUT) || (method == LLURLRequest::HTTP_POST)) {
|
||||
std::string content = "Content-Type: ";
|
||||
@@ -309,7 +311,7 @@ static void request(const std::string &url,
|
||||
chain.push_back(LLIOPipe::ptr_t(body));
|
||||
}
|
||||
|
||||
chain.push_back(LLIOPipe::ptr_t(req));
|
||||
//AIFIXME: chain.push_back(LLIOPipe::ptr_t(req));
|
||||
LLHTTPClient::getPump().addChain(chain, timeout);
|
||||
}
|
||||
|
||||
|
||||
@@ -118,6 +118,7 @@
|
||||
// <edit>
|
||||
#include "lldelayeduidelete.h"
|
||||
#include "llbuildnewviewsscheduler.h"
|
||||
#include "aicurleasyrequeststatemachine.h"
|
||||
// </edit>
|
||||
// The files below handle dependencies from cleanup.
|
||||
#include "llcalc.h"
|
||||
@@ -642,6 +643,9 @@ bool LLAppViewer::init()
|
||||
|
||||
mAlloc.setProfilingEnabled(gSavedSettings.getBOOL("MemProfiling"));
|
||||
|
||||
AIStateMachine::setMaxCount(gSavedSettings.getU32("StateMachineMaxTime"));
|
||||
AICurlEasyRequestStateMachine::setCurlRequestTimeOut(gSavedSettings.getF32("CurlRequestTimeOut"));
|
||||
|
||||
initThreads();
|
||||
LL_INFOS("InitInfo") << "Threads initialized." << LL_ENDL ;
|
||||
|
||||
|
||||
@@ -124,7 +124,8 @@ static bool handleTerrainDetailChanged(const LLSD& newvalue)
|
||||
|
||||
bool handleStateMachineMaxTimeChanged(const LLSD& newvalue)
|
||||
{
|
||||
AIStateMachine::updateSettings();
|
||||
F32 StateMachineMaxTime = newvalue.asFloat();
|
||||
AIStateMachine::setMaxCount(StateMachineMaxTime);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user