diff options
Diffstat (limited to 'indra/llmessage')
-rw-r--r-- | indra/llmessage/llcurl.cpp | 2 | ||||
-rw-r--r-- | indra/llmessage/llhttpassetstorage.cpp | 6 | ||||
-rw-r--r-- | indra/llmessage/llnamevalue.cpp | 3 | ||||
-rw-r--r-- | indra/llmessage/lluseroperation.cpp | 21 | ||||
-rw-r--r-- | indra/llmessage/lluseroperation.h | 4 |
5 files changed, 29 insertions, 7 deletions
diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index bf3ea1cd6f..13ae8e4ad5 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -76,7 +76,7 @@ namespace boost void intrusive_ptr_release(LLCurl::Responder* p) { - if(0 == --p->mReferenceCount) + if(p && 0 == --p->mReferenceCount) { delete p; } diff --git a/indra/llmessage/llhttpassetstorage.cpp b/indra/llmessage/llhttpassetstorage.cpp index 37b15d7822..534f1d8ca6 100644 --- a/indra/llmessage/llhttpassetstorage.cpp +++ b/indra/llmessage/llhttpassetstorage.cpp @@ -18,7 +18,11 @@ #include "llvfile.h" #include "llvfs.h" -#include "zlib/zlib.h" +#ifdef LL_STANDALONE +# include <zlib.h> +#else +# include "zlib/zlib.h" +#endif const U32 MAX_RUNNING_REQUESTS = 1; const F32 MAX_PROCESSING_TIME = 0.005f; diff --git a/indra/llmessage/llnamevalue.cpp b/indra/llmessage/llnamevalue.cpp index 46e28ed29e..5cb4afe2f9 100644 --- a/indra/llmessage/llnamevalue.cpp +++ b/indra/llmessage/llnamevalue.cpp @@ -102,6 +102,9 @@ void LLNameValue::baseInit() mSendto = NVS_NULL; mStringSendto = NameValueSendtoStrings[NVS_NULL]; + + mNameValueCB = NULL; + mUserData = NULL; } void LLNameValue::init(const char *name, const char *data, const char *type, const char *nvclass, const char *nvsendto, TNameValueCallback nvcb, void **user_data) diff --git a/indra/llmessage/lluseroperation.cpp b/indra/llmessage/lluseroperation.cpp index f7506c955c..01e0cf170b 100644 --- a/indra/llmessage/lluseroperation.cpp +++ b/indra/llmessage/lluseroperation.cpp @@ -22,7 +22,8 @@ LLUserOperationMgr* gUserOperationMgr = NULL; LLUserOperation::LLUserOperation(const LLUUID& agent_id) : mAgentID(agent_id), - mTimer() + mTimer(), + mNoExpire(FALSE) { mTransactionID.generate(); } @@ -31,14 +32,16 @@ LLUserOperation::LLUserOperation(const LLUUID& agent_id, const LLUUID& transaction_id) : mAgentID(agent_id), mTransactionID(transaction_id), - mTimer() + mTimer(), + mNoExpire(FALSE) { } // protected constructor which is used by base classes that determine // transaction, agent, et. after construction. LLUserOperation::LLUserOperation() : - mTimer() + mTimer(), + mNoExpire(FALSE) { } @@ -46,11 +49,19 @@ LLUserOperation::~LLUserOperation() { } +void LLUserOperation::SetNoExpireFlag(const BOOL flag) +{ + mNoExpire = flag; +} BOOL LLUserOperation::isExpired() { - const F32 EXPIRE_TIME_SECS = 10.f; - return mTimer.getElapsedTimeF32() > EXPIRE_TIME_SECS; + if (!mNoExpire) + { + const F32 EXPIRE_TIME_SECS = 10.f; + return mTimer.getElapsedTimeF32() > EXPIRE_TIME_SECS; + } + return FALSE; } void LLUserOperation::expire() diff --git a/indra/llmessage/lluseroperation.h b/indra/llmessage/lluseroperation.h index 61456bcdce..60cde39bf0 100644 --- a/indra/llmessage/lluseroperation.h +++ b/indra/llmessage/lluseroperation.h @@ -28,6 +28,9 @@ public: // Operation never got necessary data, so expired virtual BOOL isExpired(); + // ability to mark this operation as never expiring. + void SetNoExpireFlag(const BOOL flag); + // Send request to the dataserver virtual void sendRequest() = 0; @@ -47,6 +50,7 @@ protected: LLUUID mAgentID; LLUUID mTransactionID; LLFrameTimer mTimer; + BOOL mNoExpire; // this is used for operations that expect an answer and will wait till it gets one. }; |