summaryrefslogtreecommitdiff
path: root/indra/llmessage
diff options
context:
space:
mode:
authorCG Linden <cg@lindenlab.com>2010-01-29 16:29:12 -0800
committerCG Linden <cg@lindenlab.com>2010-01-29 16:29:12 -0800
commitf6a59081a7959e21f952a93bc3809315f2fa361e (patch)
treed77373c86810e505892cfb483001fe535201db46 /indra/llmessage
parentb8856efd5ff0e4899bb369dfd0815e824cd3a432 (diff)
parent682f8afcc073b62fed64a3fd2adc5f65793e1f3e (diff)
Merge in latest viewer-2-0 changes.
Diffstat (limited to 'indra/llmessage')
-rw-r--r--indra/llmessage/llares.cpp15
-rw-r--r--indra/llmessage/llcachename.cpp4
-rw-r--r--indra/llmessage/llhttpassetstorage.cpp3
-rw-r--r--indra/llmessage/llhttpnode.h2
-rw-r--r--indra/llmessage/llinstantmessage.cpp2
-rw-r--r--indra/llmessage/lliohttpserver.cpp11
-rw-r--r--indra/llmessage/llmessagetemplate.h4
-rw-r--r--indra/llmessage/llmessagetemplateparser.cpp4
-rw-r--r--indra/llmessage/llnamevalue.cpp1
-rw-r--r--indra/llmessage/lltemplatemessagebuilder.cpp8
-rw-r--r--indra/llmessage/lltransfermanager.cpp1
-rw-r--r--indra/llmessage/llxfer.cpp1
-rw-r--r--indra/llmessage/message.cpp4
-rw-r--r--indra/llmessage/partsyspacket.cpp2
14 files changed, 47 insertions, 15 deletions
diff --git a/indra/llmessage/llares.cpp b/indra/llmessage/llares.cpp
index 104629c157..00e77d20e9 100644
--- a/indra/llmessage/llares.cpp
+++ b/indra/llmessage/llares.cpp
@@ -175,7 +175,8 @@ void LLAres::rewriteURI(const std::string &uri, UriRewriteResponder *resp)
LLQueryResponder::LLQueryResponder()
: LLAres::QueryResponder(),
- mResult(ARES_ENODATA)
+ mResult(ARES_ENODATA),
+ mType(RES_INVALID)
{
}
@@ -641,8 +642,10 @@ LLPtrRecord::LLPtrRecord(const std::string &name, unsigned ttl)
}
LLAddrRecord::LLAddrRecord(LLResType type, const std::string &name,
- unsigned ttl)
- : LLDnsRecord(type, name, ttl)
+ unsigned ttl)
+ : LLDnsRecord(type, name, ttl),
+
+ mSize(0)
{
}
@@ -701,7 +704,11 @@ bail:
}
LLSrvRecord::LLSrvRecord(const std::string &name, unsigned ttl)
- : LLHostRecord(RES_SRV, name, ttl)
+ : LLHostRecord(RES_SRV, name, ttl),
+
+ mPriority(0),
+ mWeight(0),
+ mPort(0)
{
}
diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp
index 3078d80552..9363b3a8d5 100644
--- a/indra/llmessage/llcachename.cpp
+++ b/indra/llmessage/llcachename.cpp
@@ -81,6 +81,8 @@ public:
};
LLCacheNameEntry::LLCacheNameEntry()
+ : mIsGroup(false),
+ mCreateTime(0)
{
}
@@ -125,7 +127,7 @@ private:
};
ReplySender::ReplySender(LLMessageSystem* msg)
- : mMsg(msg), mPending(false)
+ : mMsg(msg), mPending(false), mCurrIsGroup(false)
{ }
ReplySender::~ReplySender()
diff --git a/indra/llmessage/llhttpassetstorage.cpp b/indra/llmessage/llhttpassetstorage.cpp
index 49dbdbd56d..1980735bbb 100644
--- a/indra/llmessage/llhttpassetstorage.cpp
+++ b/indra/llmessage/llhttpassetstorage.cpp
@@ -126,8 +126,9 @@ LLHTTPAssetRequest::LLHTTPAssetRequest(LLHTTPAssetStorage *asp,
const std::string& url,
CURLM *curl_multi)
: LLAssetRequest(uuid, type),
- mZInitialized(false)
+ mZInitialized(false)
{
+ memset(&mZStream, 0, sizeof(mZStream)); // we'll initialize this later, but for now zero the whole C-style struct to avoid debug/coverity noise
mAssetStoragep = asp;
mCurlHandle = NULL;
mCurlMultiHandle = curl_multi;
diff --git a/indra/llmessage/llhttpnode.h b/indra/llmessage/llhttpnode.h
index 915aacb7cc..8212f58653 100644
--- a/indra/llmessage/llhttpnode.h
+++ b/indra/llmessage/llhttpnode.h
@@ -305,7 +305,7 @@ protected:
~LLSimpleResponse();
private:
- LLSimpleResponse() {;} // Must be accessed through LLPointer.
+ LLSimpleResponse() : mCode(0) {} // Must be accessed through LLPointer.
};
std::ostream& operator<<(std::ostream& out, const LLSimpleResponse& resp);
diff --git a/indra/llmessage/llinstantmessage.cpp b/indra/llmessage/llinstantmessage.cpp
index 3da41939fa..a9e1ee77ef 100644
--- a/indra/llmessage/llinstantmessage.cpp
+++ b/indra/llmessage/llinstantmessage.cpp
@@ -68,9 +68,11 @@ const S32 IM_TTL = 1;
* LLIMInfo
*/
LLIMInfo::LLIMInfo() :
+ mFromGroup(FALSE),
mParentEstateID(0),
mOffline(0),
mViewerThinksToIsOnline(false),
+ mIMType(IM_NOTHING_SPECIAL),
mTimeStamp(0),
mSource(IM_FROM_SIM),
mTTL(IM_TTL)
diff --git a/indra/llmessage/lliohttpserver.cpp b/indra/llmessage/lliohttpserver.cpp
index 97134bd336..27530fbfe1 100644
--- a/indra/llmessage/lliohttpserver.cpp
+++ b/indra/llmessage/lliohttpserver.cpp
@@ -74,7 +74,12 @@ class LLHTTPPipe : public LLIOPipe
{
public:
LLHTTPPipe(const LLHTTPNode& node)
- : mNode(node), mResponse(NULL), mState(STATE_INVOKE), mChainLock(0), mStatusCode(0)
+ : mNode(node),
+ mResponse(NULL),
+ mState(STATE_INVOKE),
+ mChainLock(0),
+ mLockedPump(NULL),
+ mStatusCode(0)
{ }
virtual ~LLHTTPPipe()
{
@@ -111,7 +116,7 @@ private:
void nullPipe();
private:
- Response() {;} // Must be accessed through LLPointer.
+ Response() : mPipe(NULL) {} // Must be accessed through LLPointer.
LLHTTPPipe* mPipe;
};
friend class Response;
@@ -403,7 +408,7 @@ void LLHTTPPipe::unlockChain()
class LLHTTPResponseHeader : public LLIOPipe
{
public:
- LLHTTPResponseHeader() {}
+ LLHTTPResponseHeader() : mCode(0) {}
virtual ~LLHTTPResponseHeader() {}
protected:
diff --git a/indra/llmessage/llmessagetemplate.h b/indra/llmessage/llmessagetemplate.h
index d7f02ebd85..8abc0aaab2 100644
--- a/indra/llmessage/llmessagetemplate.h
+++ b/indra/llmessage/llmessagetemplate.h
@@ -82,7 +82,7 @@ protected:
class LLMsgBlkData
{
public:
- LLMsgBlkData(const char *name, S32 blocknum) : mOffset(-1), mBlockNumber(blocknum), mTotalSize(-1)
+ LLMsgBlkData(const char *name, S32 blocknum) : mBlockNumber(blocknum), mTotalSize(-1)
{
mName = (char *)name;
}
@@ -108,7 +108,6 @@ public:
temp->addData(data, size, type, data_size);
}
- S32 mOffset;
S32 mBlockNumber;
typedef LLDynamicArrayIndexed<LLMsgVarData, const char *, 8> msg_var_data_map_t;
msg_var_data_map_t mMemberVarData;
@@ -136,7 +135,6 @@ public:
void addDataFast(char *blockname, char *varname, const void *data, S32 size, EMsgVariableType type, S32 data_size = -1);
public:
- S32 mOffset;
typedef std::map<char*, LLMsgBlkData*> msg_blk_data_map_t;
msg_blk_data_map_t mMemberBlocks;
char *mName;
diff --git a/indra/llmessage/llmessagetemplateparser.cpp b/indra/llmessage/llmessagetemplateparser.cpp
index 283547ea00..2ddbf3e0df 100644
--- a/indra/llmessage/llmessagetemplateparser.cpp
+++ b/indra/llmessage/llmessagetemplateparser.cpp
@@ -403,6 +403,10 @@ LLTemplateParser::LLTemplateParser(LLTemplateTokenizer & tokens):
{
mMessages.push_back(templatep);
}
+ else
+ {
+ delete templatep;
+ }
}
if(!tokens.wantEOF())
diff --git a/indra/llmessage/llnamevalue.cpp b/indra/llmessage/llnamevalue.cpp
index 01e922eba2..43429b0ab3 100644
--- a/indra/llmessage/llnamevalue.cpp
+++ b/indra/llmessage/llnamevalue.cpp
@@ -963,6 +963,7 @@ std::ostream& operator<<(std::ostream& s, const LLNameValue &a)
U64_to_str(*a.mNameValueReference.u64, u64_string, sizeof(u64_string));
s << u64_string;
}
+ break;
case NVT_VEC3:
s << *(a.mNameValueReference.vec3);
break;
diff --git a/indra/llmessage/lltemplatemessagebuilder.cpp b/indra/llmessage/lltemplatemessagebuilder.cpp
index 6400310c46..55379fc6fd 100644
--- a/indra/llmessage/lltemplatemessagebuilder.cpp
+++ b/indra/llmessage/lltemplatemessagebuilder.cpp
@@ -737,10 +737,14 @@ static S32 buildBlock(U8* buffer, S32 buffer_size, const LLMessageBlock* templat
}
--block_count;
- ++block_iter;
+
if (block_iter != message_data->mMemberBlocks.end())
{
- mbci = block_iter->second;
+ ++block_iter;
+ if (block_iter != message_data->mMemberBlocks.end())
+ {
+ mbci = block_iter->second;
+ }
}
}
diff --git a/indra/llmessage/lltransfermanager.cpp b/indra/llmessage/lltransfermanager.cpp
index d67911e8e2..0a71ad95f2 100644
--- a/indra/llmessage/lltransfermanager.cpp
+++ b/indra/llmessage/lltransfermanager.cpp
@@ -855,6 +855,7 @@ void LLTransferSourceChannel::updateTransfers()
break;
case LLTS_ERROR:
llwarns << "Error in transfer dataCallback!" << llendl;
+ // fall through
case LLTS_DONE:
// We need to clean up this transfer source.
//llinfos << "LLTransferSourceChannel::updateTransfers() " << tsp->getID() << " done" << llendl;
diff --git a/indra/llmessage/llxfer.cpp b/indra/llmessage/llxfer.cpp
index 8404f6519d..7aa833ee32 100644
--- a/indra/llmessage/llxfer.cpp
+++ b/indra/llmessage/llxfer.cpp
@@ -74,6 +74,7 @@ void LLXfer::init (S32 chunk_size)
mCallback = NULL;
mCallbackDataHandle = NULL;
+ mCallbackResult = 0;
mBufferContainsEOF = FALSE;
mBuffer = NULL;
diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp
index e56d818d65..916006bc2d 100644
--- a/indra/llmessage/message.cpp
+++ b/indra/llmessage/message.cpp
@@ -253,6 +253,8 @@ LLMessageSystem::LLMessageSystem(const std::string& filename, U32 port,
{
init();
+ mSendSize = 0;
+
mSystemVersionMajor = version_major;
mSystemVersionMinor = version_minor;
mSystemVersionPatch = version_patch;
@@ -323,6 +325,8 @@ LLMessageSystem::LLMessageSystem(const std::string& filename, U32 port,
mMaxMessageTime = 1.f;
mTrueReceiveSize = 0;
+
+ mReceiveTime = 0.f;
}
diff --git a/indra/llmessage/partsyspacket.cpp b/indra/llmessage/partsyspacket.cpp
index cfb3572d84..2f9e59accb 100644
--- a/indra/llmessage/partsyspacket.cpp
+++ b/indra/llmessage/partsyspacket.cpp
@@ -144,6 +144,8 @@ LLPartSysCompressedPacket::LLPartSysCompressedPacket()
mData[i] = '\0';
}
+ mNumBytes = 0;
+
gSetInitDataDefaults(&mDefaults);
}