summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llassetuploadresponders.cpp2
-rwxr-xr-xindra/newview/llassetuploadresponders.h3
-rwxr-xr-xindra/newview/llhttpretrypolicy.cpp4
-rwxr-xr-xindra/newview/llhttpretrypolicy.h2
-rwxr-xr-xindra/newview/llinventorymodel.cpp10
-rwxr-xr-xindra/newview/llinventorymodel.h2
-rwxr-xr-xindra/newview/llmaterialmgr.cpp2
-rwxr-xr-xindra/newview/llmeshrepository.cpp17
-rwxr-xr-xindra/newview/llmeshrepository.h4
-rwxr-xr-xindra/newview/lltexturefetch.cpp29
-rwxr-xr-xindra/newview/lltexturefetch.h8
-rw-r--r--indra/newview/llviewerassetupload.cpp4
-rw-r--r--indra/newview/llviewerassetupload.h13
-rwxr-xr-xindra/newview/llxmlrpctransaction.cpp2
14 files changed, 46 insertions, 56 deletions
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp
index e492b8cf5d..fe01288e23 100755
--- a/indra/newview/llassetuploadresponders.cpp
+++ b/indra/newview/llassetuploadresponders.cpp
@@ -352,6 +352,7 @@ void LLAssetUploadResponder::uploadComplete(const LLSD& content)
{
}
+#if 0
LLNewAgentInventoryResponder::LLNewAgentInventoryResponder(
const LLSD& post_data,
const LLUUID& vfile_id,
@@ -473,6 +474,7 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content)
//LLImportColladaAssetCache::getInstance()->assetUploaded(mVFileID, content["new_asset"], TRUE);
}
+#endif
LLUpdateAgentInventoryResponder::LLUpdateAgentInventoryResponder(
const LLSD& post_data,
diff --git a/indra/newview/llassetuploadresponders.h b/indra/newview/llassetuploadresponders.h
index 18968bb1af..6828678f09 100755
--- a/indra/newview/llassetuploadresponders.h
+++ b/indra/newview/llassetuploadresponders.h
@@ -60,6 +60,7 @@ protected:
std::string mFileName;
};
+#if 0
// TODO*: Remove this once deprecated
class LLNewAgentInventoryResponder : public LLAssetUploadResponder
{
@@ -78,7 +79,7 @@ public:
protected:
virtual void httpFailure();
};
-
+#endif
#if 0
// A base class which goes through and performs some default
// actions for variable price uploads. If more specific actions
diff --git a/indra/newview/llhttpretrypolicy.cpp b/indra/newview/llhttpretrypolicy.cpp
index 530eb685fa..e2e151eb63 100755
--- a/indra/newview/llhttpretrypolicy.cpp
+++ b/indra/newview/llhttpretrypolicy.cpp
@@ -56,7 +56,7 @@ bool LLAdaptiveRetryPolicy::getRetryAfter(const LLSD& headers, F32& retry_header
&& getSecondsUntilRetryAfter(headers[HTTP_IN_HEADER_RETRY_AFTER].asStringRef(), retry_header_time));
}
-bool LLAdaptiveRetryPolicy::getRetryAfter(const LLCore::HttpHeaders *headers, F32& retry_header_time)
+bool LLAdaptiveRetryPolicy::getRetryAfter(const LLCore::HttpHeaders::ptr_t &headers, F32& retry_header_time)
{
if (headers)
{
@@ -85,7 +85,7 @@ void LLAdaptiveRetryPolicy::onFailure(S32 status, const LLSD& headers)
void LLAdaptiveRetryPolicy::onFailure(const LLCore::HttpResponse *response)
{
F32 retry_header_time;
- const LLCore::HttpHeaders *headers = response->getHeaders();
+ const LLCore::HttpHeaders::ptr_t headers = response->getHeaders();
bool has_retry_header_time = getRetryAfter(headers,retry_header_time);
onFailureCommon(response->getStatus().getType(), has_retry_header_time, retry_header_time);
}
diff --git a/indra/newview/llhttpretrypolicy.h b/indra/newview/llhttpretrypolicy.h
index cf79e0b401..c0cc263546 100755
--- a/indra/newview/llhttpretrypolicy.h
+++ b/indra/newview/llhttpretrypolicy.h
@@ -79,7 +79,7 @@ public:
protected:
void init();
bool getRetryAfter(const LLSD& headers, F32& retry_header_time);
- bool getRetryAfter(const LLCore::HttpHeaders *headers, F32& retry_header_time);
+ bool getRetryAfter(const LLCore::HttpHeaders::ptr_t &headers, F32& retry_header_time);
void onFailureCommon(S32 status, bool has_retry_header_time, F32 retry_header_time);
private:
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 6d21dd4ba7..cf550c20c5 100755
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -149,7 +149,7 @@ LLInventoryModel::LLInventoryModel()
mHttpRequestFG(NULL),
mHttpRequestBG(NULL),
mHttpOptions(NULL),
- mHttpHeaders(NULL),
+ mHttpHeaders(),
mHttpPolicyClass(LLCore::HttpRequest::DEFAULT_POLICY_ID),
mHttpPriorityFG(0),
mHttpPriorityBG(0),
@@ -178,11 +178,7 @@ void LLInventoryModel::cleanupInventory()
mObservers.clear();
// Run down HTTP transport
- if (mHttpHeaders)
- {
- mHttpHeaders->release();
- mHttpHeaders = NULL;
- }
+ mHttpHeaders.reset();
if (mHttpOptions)
{
mHttpOptions->release();
@@ -2422,7 +2418,7 @@ void LLInventoryModel::initHttpRequest()
mHttpOptions->setTransferTimeout(300);
mHttpOptions->setUseRetryAfter(true);
// mHttpOptions->setTrace(2); // Do tracing of requests
- mHttpHeaders = new LLCore::HttpHeaders;
+ mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders);
mHttpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_LLSD_XML);
mHttpHeaders->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_LLSD_XML);
mHttpPolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_INVENTORY);
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index 26ee06535a..9711fb95f6 100755
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -572,7 +572,7 @@ private:
LLCore::HttpRequest * mHttpRequestFG;
LLCore::HttpRequest * mHttpRequestBG;
LLCore::HttpOptions * mHttpOptions;
- LLCore::HttpHeaders * mHttpHeaders;
+ LLCore::HttpHeaders::ptr_t mHttpHeaders;
LLCore::HttpRequest::policy_t mHttpPolicyClass;
LLCore::HttpRequest::priority_t mHttpPriorityFG;
LLCore::HttpRequest::priority_t mHttpPriorityBG;
diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp
index aef5bcf0dd..e6f3540877 100755
--- a/indra/newview/llmaterialmgr.cpp
+++ b/indra/newview/llmaterialmgr.cpp
@@ -712,7 +712,7 @@ void LLMaterialMgr::processGetAllQueue()
);
LLCore::HttpHandle handle = mHttpRequest->requestGet(mHttpPolicy, mHttpPriority, capURL,
- mHttpOptions.get(), mHttpHeaders.get(), handler);
+ mHttpOptions.get(), mHttpHeaders, handler);
if (handle == LLCORE_HTTP_HANDLE_INVALID)
{
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 648056484e..7f8e357e33 100755
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -740,7 +740,7 @@ LLMeshRepoThread::LLMeshRepoThread()
mHttpRequest(NULL),
mHttpOptions(NULL),
mHttpLargeOptions(NULL),
- mHttpHeaders(NULL),
+ mHttpHeaders(),
mHttpPolicyClass(LLCore::HttpRequest::DEFAULT_POLICY_ID),
mHttpLegacyPolicyClass(LLCore::HttpRequest::DEFAULT_POLICY_ID),
mHttpLargePolicyClass(LLCore::HttpRequest::DEFAULT_POLICY_ID),
@@ -759,7 +759,7 @@ LLMeshRepoThread::LLMeshRepoThread()
mHttpLargeOptions = new LLCore::HttpOptions;
mHttpLargeOptions->setTransferTimeout(LARGE_MESH_XFER_TIMEOUT);
mHttpLargeOptions->setUseRetryAfter(gSavedSettings.getBOOL("MeshUseHttpRetryAfter"));
- mHttpHeaders = new LLCore::HttpHeaders;
+ mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders);
mHttpHeaders->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_VND_LL_MESH);
mHttpPolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_MESH2);
mHttpLegacyPolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_MESH1);
@@ -781,11 +781,7 @@ LLMeshRepoThread::~LLMeshRepoThread()
delete *iter;
}
mHttpRequestSet.clear();
- if (mHttpHeaders)
- {
- mHttpHeaders->release();
- mHttpHeaders = NULL;
- }
+ mHttpHeaders.reset();
if (mHttpOptions)
{
mHttpOptions->release();
@@ -1886,7 +1882,7 @@ LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data,
mHttpOptions->setTransferTimeout(mMeshUploadTimeOut);
mHttpOptions->setUseRetryAfter(gSavedSettings.getBOOL("MeshUseHttpRetryAfter"));
mHttpOptions->setRetries(UPLOAD_RETRY_LIMIT);
- mHttpHeaders = new LLCore::HttpHeaders;
+ mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders);
mHttpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_LLSD_XML);
mHttpPolicyClass = LLAppViewer::instance()->getAppCoreHttp().getPolicy(LLAppCoreHttp::AP_UPLOADS);
mHttpPriority = 0;
@@ -1894,11 +1890,6 @@ LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data,
LLMeshUploadThread::~LLMeshUploadThread()
{
- if (mHttpHeaders)
- {
- mHttpHeaders->release();
- mHttpHeaders = NULL;
- }
if (mHttpOptions)
{
mHttpOptions->release();
diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h
index 39280bea3a..dc1fa883b3 100755
--- a/indra/newview/llmeshrepository.h
+++ b/indra/newview/llmeshrepository.h
@@ -324,7 +324,7 @@ public:
LLCore::HttpRequest * mHttpRequest;
LLCore::HttpOptions * mHttpOptions;
LLCore::HttpOptions * mHttpLargeOptions;
- LLCore::HttpHeaders * mHttpHeaders;
+ LLCore::HttpHeaders::ptr_t mHttpHeaders;
LLCore::HttpRequest::policy_t mHttpPolicyClass;
LLCore::HttpRequest::policy_t mHttpLegacyPolicyClass;
LLCore::HttpRequest::policy_t mHttpLargePolicyClass;
@@ -494,7 +494,7 @@ private:
LLCore::HttpStatus mHttpStatus;
LLCore::HttpRequest * mHttpRequest;
LLCore::HttpOptions * mHttpOptions;
- LLCore::HttpHeaders * mHttpHeaders;
+ LLCore::HttpHeaders::ptr_t mHttpHeaders;
LLCore::HttpRequest::policy_t mHttpPolicyClass;
LLCore::HttpRequest::priority_t mHttpPriority;
};
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index f4b1ff7313..1055216b65 100755
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -2511,9 +2511,9 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image
mHttpRequest(NULL),
mHttpOptions(NULL),
mHttpOptionsWithHeaders(NULL),
- mHttpHeaders(NULL),
+ mHttpHeaders(),
mHttpPolicyClass(LLCore::HttpRequest::DEFAULT_POLICY_ID),
- mHttpMetricsHeaders(NULL),
+ mHttpMetricsHeaders(),
mHttpMetricsPolicyClass(LLCore::HttpRequest::DEFAULT_POLICY_ID),
mTotalCacheReadCount(0U),
mTotalCacheWriteCount(0U),
@@ -2531,10 +2531,10 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, LLImageDecodeThread* image
mHttpOptions = new LLCore::HttpOptions;
mHttpOptionsWithHeaders = new LLCore::HttpOptions;
mHttpOptionsWithHeaders->setWantHeaders(true);
- mHttpHeaders = new LLCore::HttpHeaders;
+ mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders);
mHttpHeaders->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_IMAGE_X_J2C);
mHttpPolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_TEXTURE);
- mHttpMetricsHeaders = new LLCore::HttpHeaders;
+ mHttpMetricsHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders);
mHttpMetricsHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_LLSD_XML);
mHttpMetricsPolicyClass = app_core_http.getPolicy(LLAppCoreHttp::AP_REPORTING);
mHttpHighWater = HTTP_NONPIPE_REQUESTS_HIGH_WATER;
@@ -2580,18 +2580,6 @@ LLTextureFetch::~LLTextureFetch()
mHttpOptionsWithHeaders = NULL;
}
- if (mHttpHeaders)
- {
- mHttpHeaders->release();
- mHttpHeaders = NULL;
- }
-
- if (mHttpMetricsHeaders)
- {
- mHttpMetricsHeaders->release();
- mHttpMetricsHeaders = NULL;
- }
-
mHttpWaitResource.clear();
delete mHttpRequest;
@@ -4162,7 +4150,7 @@ LLTextureFetchDebugger::LLTextureFetchDebugger(LLTextureFetch* fetcher, LLTextur
mFetcher(fetcher),
mTextureCache(cache),
mImageDecodeThread(imagedecodethread),
- mHttpHeaders(NULL),
+ mHttpHeaders(),
mHttpPolicyClass(fetcher->getPolicyClass()),
mNbCurlCompleted(0),
mTempIndex(0),
@@ -4176,11 +4164,6 @@ LLTextureFetchDebugger::~LLTextureFetchDebugger()
mFetchingHistory.clear();
mStopDebug = TRUE;
tryToStopDebug();
- if (mHttpHeaders)
- {
- mHttpHeaders->release();
- mHttpHeaders = NULL;
- }
}
void LLTextureFetchDebugger::init()
@@ -4225,7 +4208,7 @@ void LLTextureFetchDebugger::init()
if (! mHttpHeaders)
{
- mHttpHeaders = new LLCore::HttpHeaders;
+ mHttpHeaders = LLCore::HttpHeaders::ptr_t(new LLCore::HttpHeaders);
mHttpHeaders->append(HTTP_OUT_HEADER_ACCEPT, HTTP_CONTENT_IMAGE_X_J2C);
}
}
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h
index 27779a31e0..a5d6cd63d7 100755
--- a/indra/newview/lltexturefetch.h
+++ b/indra/newview/lltexturefetch.h
@@ -177,7 +177,7 @@ public:
// to do that to hold a reference for any length of time.
//
// Threads: T*
- LLCore::HttpHeaders * getMetricsHeaders() const { return mHttpMetricsHeaders; }
+ LLCore::HttpHeaders::ptr_t getMetricsHeaders() const { return mHttpMetricsHeaders; }
// Threads: T*
LLCore::HttpRequest::policy_t getMetricsPolicyClass() const { return mHttpMetricsPolicyClass; }
@@ -356,9 +356,9 @@ private:
LLCore::HttpRequest * mHttpRequest; // Ttf
LLCore::HttpOptions * mHttpOptions; // Ttf
LLCore::HttpOptions * mHttpOptionsWithHeaders; // Ttf
- LLCore::HttpHeaders * mHttpHeaders; // Ttf
+ LLCore::HttpHeaders::ptr_t mHttpHeaders; // Ttf
LLCore::HttpRequest::policy_t mHttpPolicyClass; // T*
- LLCore::HttpHeaders * mHttpMetricsHeaders; // Ttf
+ LLCore::HttpHeaders::ptr_t mHttpMetricsHeaders; // Ttf
LLCore::HttpRequest::policy_t mHttpMetricsPolicyClass; // T*
S32 mHttpHighWater; // Ttf
S32 mHttpLowWater; // Ttf
@@ -510,7 +510,7 @@ private:
LLTextureFetch* mFetcher;
LLTextureCache* mTextureCache;
LLImageDecodeThread* mImageDecodeThread;
- LLCore::HttpHeaders* mHttpHeaders;
+ LLCore::HttpHeaders::ptr_t mHttpHeaders;
LLCore::HttpRequest::policy_t mHttpPolicyClass;
S32 mNumFetchedTextures;
diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp
index bfcdbfc109..efaf95444d 100644
--- a/indra/newview/llviewerassetupload.cpp
+++ b/indra/newview/llviewerassetupload.cpp
@@ -394,6 +394,9 @@ LLSD NewFileResourceUploadInfo::exportTempFile()
}
//=========================================================================
+
+
+//=========================================================================
/*static*/
void LLViewerAssetUpload::AssetInventoryUploadCoproc(LLCoros::self &self, LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, const LLUUID &id,
std::string url, NewResourceUploadInfo::ptr_t uploadInfo)
@@ -552,3 +555,4 @@ void LLViewerAssetUpload::HandleUploadError(LLCore::HttpStatus status, LLSD &res
}
}
+
diff --git a/indra/newview/llviewerassetupload.h b/indra/newview/llviewerassetupload.h
index 771828b393..a2b250b33b 100644
--- a/indra/newview/llviewerassetupload.h
+++ b/indra/newview/llviewerassetupload.h
@@ -176,6 +176,19 @@ private:
};
+#if 0
+class NotecardResourceUploadInfo : public NewResourceUploadInfo
+{
+public:
+ NotecardResourceUploadInfo(
+ );
+
+
+protected:
+
+private:
+};
+#endif
class LLViewerAssetUpload
{
diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index 066970614a..63ad4bd49b 100755
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -390,7 +390,7 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip)
mHandler = LLXMLRPCTransaction::Handler::ptr_t(new Handler( mHttpRequest, this ));
mPostH = mHttpRequest->requestPost(LLCore::HttpRequest::DEFAULT_POLICY_ID, 0,
- mURI, body.get(), httpOpts.get(), httpHeaders.get(), mHandler.get());
+ mURI, body.get(), httpOpts.get(), httpHeaders, mHandler.get());
}