diff options
Diffstat (limited to 'indra/llmessage')
47 files changed, 250 insertions, 252 deletions
| diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp index 2f76e686ec..13fda24e62 100644 --- a/indra/llmessage/llassetstorage.cpp +++ b/indra/llmessage/llassetstorage.cpp @@ -198,14 +198,14 @@ LLBaseDownloadRequest::LLBaseDownloadRequest(const LLUUID &uuid, const LLAssetTy        mDownCallback(),        mUserData(NULL),        mHost(), -      mIsTemp(FALSE), -      mIsPriority(FALSE), -      mDataSentInFirstPacket(FALSE), -      mDataIsInCache(FALSE) +      mIsTemp(false), +      mIsPriority(false), +      mDataSentInFirstPacket(false), +      mDataIsInCache(false)  {      // Need to guarantee that this time is up to date, we may be creating a circuit even though we haven't been      //  running a message system loop. -    mTime = LLMessageSystem::getMessageTimeSeconds(TRUE); +    mTime = LLMessageSystem::getMessageTimeSeconds(true);  }  // virtual @@ -228,8 +228,8 @@ LLAssetRequest::LLAssetRequest(const LLUUID &uuid, const LLAssetType::EType type      :   LLBaseDownloadRequest(uuid, type),          mUpCallback(),          mInfoCallback( NULL ), -        mIsLocal(FALSE), -        mIsUserWaiting(FALSE), +        mIsLocal(false), +        mIsUserWaiting(false),          mTimeout(LL_ASSET_STORAGE_TIMEOUT),          mBytesFetched(0)  { @@ -344,7 +344,7 @@ void LLAssetStorage::_init(LLMessageSystem *msg,                             LLXferManager *xfer,                             const LLHost &upstream_host)  { -    mShutDown = FALSE; +    mShutDown = false;      mMessageSys = msg;      mXferManager = xfer; diff --git a/indra/llmessage/llassetstorage.h b/indra/llmessage/llassetstorage.h index d9c95485f6..dd63724039 100644 --- a/indra/llmessage/llassetstorage.h +++ b/indra/llmessage/llassetstorage.h @@ -122,11 +122,11 @@ public:      void	*mUserData;      LLHost  mHost; -    BOOL	mIsTemp; +    bool	mIsTemp;      F64Seconds		mTime;				// Message system time -    BOOL    mIsPriority; -    BOOL	mDataSentInFirstPacket; -    BOOL	mDataIsInCache; +    bool    mIsPriority; +    bool	mDataSentInFirstPacket; +    bool	mDataIsInCache;  };  class LLAssetRequest : public LLBaseDownloadRequest @@ -143,8 +143,8 @@ public:  //	void	(*mUpCallback)(const LLUUID&, void *, S32, LLExtStat);  	void	(*mInfoCallback)(LLAssetInfo *, void *, S32); -	BOOL	mIsLocal; -	BOOL	mIsUserWaiting;		// We don't want to try forever if a user is waiting for a result. +	bool	mIsLocal; +	bool	mIsUserWaiting;		// We don't want to try forever if a user is waiting for a result.  	F64Seconds		mTimeout;			// Amount of time before timing out.  	LLUUID	mRequestingAgentID;	// Only valid for uploads from an agent      F64	mBytesFetched; @@ -209,7 +209,7 @@ public:  	};  protected: -	BOOL mShutDown; +	bool mShutDown;  	LLHost mUpstreamHost;  	LLMessageSystem *mMessageSys; diff --git a/indra/llmessage/llblowfishcipher.h b/indra/llmessage/llblowfishcipher.h index e2e54526e8..65228df11f 100644 --- a/indra/llmessage/llblowfishcipher.h +++ b/indra/llmessage/llblowfishcipher.h @@ -46,7 +46,7 @@ public:  	/*virtual*/ U32 requiredEncryptionSpace(U32 src_len) const;  #ifdef _DEBUG -	static BOOL testHarness(); +	static bool testHarness();  #endif  private: diff --git a/indra/llmessage/llcachename.cpp b/indra/llmessage/llcachename.cpp index 59dd64336e..c90b6d86ad 100644 --- a/indra/llmessage/llcachename.cpp +++ b/indra/llmessage/llcachename.cpp @@ -99,7 +99,7 @@ public:  	}  	void done()			{ mID.setNull(); } -	bool isDone() const	{ return mID.isNull() != FALSE; } +	bool isDone() const	{ return mID.isNull() != false; }  };  class ReplySender diff --git a/indra/llmessage/llcircuit.cpp b/indra/llmessage/llcircuit.cpp index bb667201a0..a0bf999dee 100644 --- a/indra/llmessage/llcircuit.cpp +++ b/indra/llmessage/llcircuit.cpp @@ -73,10 +73,10 @@ LLCircuitData::LLCircuitData(const LLHost &host, TPACKETID in_id,  	mHighestPacketID(in_id),  	mTimeoutCallback(NULL),  	mTimeoutUserData(NULL), -	mTrusted(FALSE), -	mbAllowTimeout(TRUE), -	mbAlive(TRUE), -	mBlocked(FALSE), +	mTrusted(false), +	mbAllowTimeout(true), +	mbAlive(true), +	mBlocked(false),  	mPingTime(0.0),  	mLastPingSendTime(0.0),  	mLastPingReceivedTime(0.0), @@ -111,7 +111,7 @@ LLCircuitData::LLCircuitData(const LLHost &host, TPACKETID in_id,  {  	// Need to guarantee that this time is up to date, we may be creating a circuit even though we haven't been  	//  running a message system loop. -	F64Seconds mt_sec = LLMessageSystem::getMessageTimeSeconds(TRUE); +	F64Seconds mt_sec = LLMessageSystem::getMessageTimeSeconds(true);  	F32 distribution_offset = ll_frand();  	mPingTime = mt_sec; @@ -1273,7 +1273,7 @@ void LLCircuitData::pingTimerStop(const U8 ping_id)  	{  		// Ack, we got our ping response on the same frame! Sigh, let's get a real time otherwise  		// all of our ping calculations will be skewed. -		mt_secs = LLMessageSystem::getMessageTimeSeconds(TRUE); +		mt_secs = LLMessageSystem::getMessageTimeSeconds(true);  	}  	mLastPingReceivedTime = mt_secs; @@ -1291,7 +1291,7 @@ void LLCircuitData::pingTimerStop(const U8 ping_id)  	mPingsInTransit = delta_ping;  	if (mBlocked && (mPingsInTransit <= PING_RELEASE_BLOCK))  	{ -		mBlocked = FALSE; +		mBlocked = false;  	}  } diff --git a/indra/llmessage/llclassifiedflags.h b/indra/llmessage/llclassifiedflags.h index 0365ea8f09..9298b90357 100644 --- a/indra/llmessage/llclassifiedflags.h +++ b/indra/llmessage/llclassifiedflags.h @@ -53,7 +53,7 @@ const S32 MAX_CLASSIFIEDS = 100;  // we can revert back to ClassifiedFlags pack_classified_flags and get rider of this one.  ClassifiedFlags pack_classified_flags_request(bool auto_renew, bool is_pg, bool is_mature, bool is_adult); -ClassifiedFlags pack_classified_flags(BOOL auto_renew, BOOL is_pg, BOOL is_mature, BOOL is_adult); +ClassifiedFlags pack_classified_flags(bool auto_renew, bool is_pg, bool is_mature, bool is_adult);  bool is_cf_mature(ClassifiedFlags flags);  //bool is_cf_enabled(ClassifiedFlags flags);  bool is_cf_update_time(ClassifiedFlags flags); diff --git a/indra/llmessage/llmessagetemplate.h b/indra/llmessage/llmessagetemplate.h index a44e16fc3a..41aca4ab91 100644 --- a/indra/llmessage/llmessagetemplate.h +++ b/indra/llmessage/llmessagetemplate.h @@ -361,14 +361,14 @@ public:  		mUserData = user_data;  	} -	BOOL callHandlerFunc(LLMessageSystem *msgsystem) const +	bool callHandlerFunc(LLMessageSystem *msgsystem) const  	{  		if (mHandlerFunc)  		{  			mHandlerFunc(msgsystem, mUserData); -			return TRUE; +			return true;  		} -		return FALSE; +		return false;  	}  	bool isUdpBanned() const diff --git a/indra/llmessage/llmessagetemplateparser.cpp b/indra/llmessage/llmessagetemplateparser.cpp index 3e81fed49e..4b61272454 100644 --- a/indra/llmessage/llmessagetemplateparser.cpp +++ b/indra/llmessage/llmessagetemplateparser.cpp @@ -180,12 +180,12 @@ bool	b_check_token(const char *token, const char *regexp)  		if (current_checker == -1)  		{  			LL_ERRS() << "Input exceeds regular expression!\nDid you forget a *?" << LL_ENDL; -			return FALSE; +			return false;  		}  		if (!gParseCheckCharacters[current_checker](token[tptr]))  		{ -			return FALSE; +			return false;  		}  		if (next_checker != 9999)  		{ diff --git a/indra/llmessage/llpacketack.h b/indra/llmessage/llpacketack.h index f0ed923f19..76e2e43acb 100644 --- a/indra/llmessage/llpacketack.h +++ b/indra/llmessage/llpacketack.h @@ -35,7 +35,7 @@ class LLReliablePacketParams  public:  	LLHost mHost;  	S32 mRetries; -	BOOL mPingBasedRetry; +	bool mPingBasedRetry;  	F32Seconds mTimeout;  	void (*mCallback)(void **,S32);  	void** mCallbackData; @@ -53,7 +53,7 @@ public:  	{  		mHost.invalidate();  		mRetries = 0; -		mPingBasedRetry = TRUE; +		mPingBasedRetry = true;  		mTimeout = F32Seconds(0.f);  		mCallback = NULL;  		mCallbackData = NULL; @@ -63,7 +63,7 @@ public:  	void set(  		const LLHost& host,  		S32 retries, -		BOOL ping_based_retry, +		bool ping_based_retry,  		F32Seconds timeout,   		void (*callback)(void**,S32),  		void** callback_data, char* name) @@ -98,7 +98,7 @@ protected:  	S32 mSocket;  	LLHost mHost;  	S32 mRetries; -	BOOL mPingBasedRetry; +	bool mPingBasedRetry;  	F32Seconds mTimeout;  	void (*mCallback)(void**,S32);  	void** mCallbackData; diff --git a/indra/llmessage/llpacketring.cpp b/indra/llmessage/llpacketring.cpp index 7ba76bea25..8e098bfc8c 100644 --- a/indra/llmessage/llpacketring.cpp +++ b/indra/llmessage/llpacketring.cpp @@ -45,8 +45,8 @@  ///////////////////////////////////////////////////////////  LLPacketRing::LLPacketRing () : -	mUseInThrottle(FALSE), -	mUseOutThrottle(FALSE), +	mUseInThrottle(false), +	mUseOutThrottle(false),  	mInThrottle(256000.f),  	mOutThrottle(64000.f),  	mActualBitsIn(0), diff --git a/indra/llmessage/llregionflags.h b/indra/llmessage/llregionflags.h index 464bf05250..489765e0ac 100644 --- a/indra/llmessage/llregionflags.h +++ b/indra/llmessage/llregionflags.h @@ -106,7 +106,7 @@ const U64 REGION_FLAGS_ESTATE_MASK = REGION_FLAGS_EXTERNALLY_VISIBLE  									 | REGION_FLAGS_DENY_ANONYMOUS  									 | REGION_FLAGS_DENY_AGEUNVERIFIED; -inline BOOL is_prelude( U64 flags ) +inline bool is_prelude( U64 flags )  {  	// definition of prelude does not depend on fixed-sun  	return 0 == (flags & REGION_FLAGS_PRELUDE_UNSET) diff --git a/indra/llmessage/llregionhandle.h b/indra/llmessage/llregionhandle.h index 085757dcbc..284426c148 100644 --- a/indra/llmessage/llregionhandle.h +++ b/indra/llmessage/llregionhandle.h @@ -63,13 +63,13 @@ inline U64 to_region_handle_global(const F32 x_global, const F32 y_global)  	return region_handle;  } -inline BOOL to_region_handle(const F32 x_pos, const F32 y_pos, U64 *region_handle) +inline bool to_region_handle(const F32 x_pos, const F32 y_pos, U64 *region_handle)  {  	U32 x_int, y_int;  	if (x_pos < 0.f)  	{  //		LL_WARNS() << "to_region_handle:Clamping negative x position " << x_pos << " to zero!" << LL_ENDL; -		return FALSE; +		return false;  	}  	else  	{ @@ -78,14 +78,14 @@ inline BOOL to_region_handle(const F32 x_pos, const F32 y_pos, U64 *region_handl  	if (y_pos < 0.f)  	{  //		LL_WARNS() << "to_region_handle:Clamping negative y position " << y_pos << " to zero!" << LL_ENDL; -		return FALSE; +		return false;  	}  	else  	{  		y_int = (U32)ll_round(y_pos);  	}  	*region_handle = to_region_handle(x_int, y_int); -	return TRUE; +	return true;  }  // stuff the word-frame XY location of sim's SouthWest corner in x_pos, y_pos diff --git a/indra/llmessage/llsdmessagebuilder.cpp b/indra/llmessage/llsdmessagebuilder.cpp index 7ea0c55afd..309cf53bef 100644 --- a/indra/llmessage/llsdmessagebuilder.cpp +++ b/indra/llmessage/llsdmessagebuilder.cpp @@ -44,8 +44,8 @@ LLSDMessageBuilder::LLSDMessageBuilder() :  	mCurrentBlock(NULL),  	mCurrentMessageName(""),  	mCurrentBlockName(""), -	mbSBuilt(FALSE), -	mbSClear(TRUE) +	mbSBuilt(false), +	mbSClear(true)  {  } @@ -58,8 +58,8 @@ LLSDMessageBuilder::~LLSDMessageBuilder()  // virtual  void LLSDMessageBuilder::newMessage(const char* name)  { -	mbSBuilt = FALSE; -	mbSClear = FALSE; +	mbSBuilt = false; +	mbSClear = false;  	mCurrentMessage = LLSD::emptyMap();  	mCurrentMessageName = (char*)name; @@ -170,7 +170,7 @@ void LLSDMessageBuilder::addIPPort(const char* varname, U16 v)  void LLSDMessageBuilder::addBOOL(const char* varname, bool v)  { -	(*mCurrentBlock)[varname] = (v == true); +	(*mCurrentBlock)[varname] = v;  }  void LLSDMessageBuilder::addString(const char* varname, const char* v) @@ -354,7 +354,7 @@ void LLSDMessageBuilder::copyFromMessageData(const LLMsgData& data)  				break;	  			case MVT_BOOL: -				addBOOL(varname, *(BOOL*)mvci.getData()); +				addBOOL(varname, *(bool*)mvci.getData());  				break;  			case MVT_IP_ADDR: diff --git a/indra/llmessage/llsdmessagebuilder.h b/indra/llmessage/llsdmessagebuilder.h index f1e824f5d4..2c728977ca 100644 --- a/indra/llmessage/llsdmessagebuilder.h +++ b/indra/llmessage/llsdmessagebuilder.h @@ -119,8 +119,8 @@ private:  	LLSD* mCurrentBlock;  	std::string mCurrentMessageName;  	std::string mCurrentBlockName; -	BOOL mbSBuilt; -	BOOL mbSClear; +	bool mbSBuilt; +	bool mbSClear;  };  #endif // LL_LLSDMESSAGEBUILDER_H diff --git a/indra/llmessage/lltemplatemessagebuilder.cpp b/indra/llmessage/lltemplatemessagebuilder.cpp index fad94ecab6..4188feb318 100644 --- a/indra/llmessage/lltemplatemessagebuilder.cpp +++ b/indra/llmessage/lltemplatemessagebuilder.cpp @@ -42,8 +42,8 @@ LLTemplateMessageBuilder::LLTemplateMessageBuilder(const message_template_name_m  	mCurrentSDataBlock(NULL),  	mCurrentSMessageName(NULL),  	mCurrentSBlockName(NULL), -	mbSBuilt(FALSE), -	mbSClear(TRUE), +	mbSBuilt(false), +	mbSClear(true),  	mCurrentSendTotal(0),  	mMessageTemplates(name_template_map)  { @@ -59,8 +59,8 @@ LLTemplateMessageBuilder::~LLTemplateMessageBuilder()  // virtual  void LLTemplateMessageBuilder::newMessage(const char *name)  { -	mbSBuilt = FALSE; -	mbSClear = FALSE; +	mbSBuilt = false; +	mbSClear = false;  	mCurrentSendTotal = 0; @@ -103,8 +103,8 @@ void LLTemplateMessageBuilder::newMessage(const char *name)  // virtual  void LLTemplateMessageBuilder::clearMessage()  { -	mbSBuilt = FALSE; -	mbSClear = TRUE; +	mbSBuilt = false; +	mbSClear = true;  	mCurrentSendTotal = 0; @@ -447,8 +447,6 @@ void LLTemplateMessageBuilder::addIPPort(const char *varname, U16 u)  void LLTemplateMessageBuilder::addBOOL(const char* varname, bool b)  { -	// Can't just cast a BOOL (actually a U32) to a U8. -	// In some cases the low order bits will be zero.  	U8 temp = (b != 0);  	addData(varname, &temp, MVT_BOOL, sizeof(temp));  } @@ -823,7 +821,7 @@ U32 LLTemplateMessageBuilder::buildMessage(  	{  		result += buildBlock(buffer + result, buffer_size - result, *iter, mCurrentSMessageData);  	} -	mbSBuilt = TRUE; +	mbSBuilt = true;  	return result;  } diff --git a/indra/llmessage/lltemplatemessagebuilder.h b/indra/llmessage/lltemplatemessagebuilder.h index b8b4b36c3d..f02ed0c06d 100644 --- a/indra/llmessage/lltemplatemessagebuilder.h +++ b/indra/llmessage/lltemplatemessagebuilder.h @@ -106,8 +106,8 @@ private:  	LLMsgBlkData* mCurrentSDataBlock;  	char* mCurrentSMessageName;  	char* mCurrentSBlockName; -	BOOL mbSBuilt; -	BOOL mbSClear; +	bool mbSBuilt; +	bool mbSClear;  	S32	 mCurrentSendTotal;  	const message_template_name_map_t& mMessageTemplates;  }; diff --git a/indra/llmessage/llthrottle.cpp b/indra/llmessage/llthrottle.cpp index dc02b5ea90..0cfe5dbf38 100644 --- a/indra/llmessage/llthrottle.cpp +++ b/indra/llmessage/llthrottle.cpp @@ -37,7 +37,7 @@ LLThrottle::LLThrottle(const F32 rate)  	mRate = rate;  	mAvailable = 0.f;  	mLookaheadSecs = 0.25f; -	mLastSendTime = LLMessageSystem::getMessageTimeSeconds(TRUE); +	mLastSendTime = LLMessageSystem::getMessageTimeSeconds(true);  } diff --git a/indra/llmessage/lltransfermanager.cpp b/indra/llmessage/lltransfermanager.cpp index fb901644c7..bad12101e5 100644 --- a/indra/llmessage/lltransfermanager.cpp +++ b/indra/llmessage/lltransfermanager.cpp @@ -49,7 +49,7 @@ LLTransferSource::stype_scfunc_map LLTransferSource::sSourceCreateMap;  //  LLTransferManager::LLTransferManager() : -	mValid(FALSE) +	mValid(false)  {  	S32 i;  	for (i = 0; i < LLTTT_NUM_TYPES; i++) @@ -78,7 +78,7 @@ void LLTransferManager::init()  	{  		LL_ERRS() << "Double initializing LLTransferManager!" << LL_ENDL;  	} -	mValid = TRUE; +	mValid = true;  	// Register message system handlers  	gMessageSystem->setHandlerFunc("TransferRequest", processTransferRequest, NULL); @@ -90,7 +90,7 @@ void LLTransferManager::init()  void LLTransferManager::cleanup()  { -	mValid = FALSE; +	mValid = false;  	host_tc_map::iterator iter;  	for (iter = mTransferConnections.begin(); iter != mTransferConnections.end(); iter++) @@ -342,7 +342,7 @@ void LLTransferManager::processTransferInfo(LLMessageSystem *msgp, void **)  	//LL_INFOS() << "Receiving " << transfer_id << ", size " << size << " bytes" << LL_ENDL;  	ttp->setSize(size); -	ttp->setGotInfo(TRUE); +	ttp->setGotInfo(true);  	// OK, at this point we to handle any delayed transfer packets (which could happen  	// if this packet was lost) @@ -557,7 +557,7 @@ void LLTransferManager::processTransferPacket(LLMessageSystem *msgp, void **)  		else  		{  			// No matching delayed packet, abort it. -			done = TRUE; +			done = true;  		}  	}  } @@ -822,7 +822,7 @@ void LLTransferSourceChannel::updateTransfers()  		gMessageSystem->addS32("Status", status);  		gMessageSystem->addBinaryData("Data", datap, data_size);  		sent_bytes = gMessageSystem->getCurrentSendTotal(); -		gMessageSystem->sendReliable(getHost(), LL_DEFAULT_RELIABLE_RETRIES, TRUE, F32Seconds(0.f), +		gMessageSystem->sendReliable(getHost(), LL_DEFAULT_RELIABLE_RETRIES, true, F32Seconds(0.f),  									 LLTransferManager::reliablePacketCallback, (void**)cb_uuid);  		// Do bookkeeping for the throttle @@ -1207,7 +1207,7 @@ LLTransferTarget::LLTransferTarget(  	mSourceType(source_type),  	mID(transfer_id),  	mChannelp(NULL), -	mGotInfo(FALSE), +	mGotInfo(false),  	mSize(0),  	mLastPacketID(-1)  { diff --git a/indra/llmessage/lltransfermanager.h b/indra/llmessage/lltransfermanager.h index a756771445..15097642b4 100644 --- a/indra/llmessage/lltransfermanager.h +++ b/indra/llmessage/lltransfermanager.h @@ -121,7 +121,7 @@ public:  	LLTransferSource *findTransferSource(const LLUUID &transfer_id); -	BOOL						isValid() const			{ return mValid; } +	bool						isValid() const			{ return mValid; }  	static void processTransferRequest(LLMessageSystem *mesgsys, void **);  	static void processTransferInfo(LLMessageSystem *mesgsys, void **); @@ -138,13 +138,13 @@ public:  	void addTransferBitsOut(const LLTransferChannelType tctype, const S32 bits)	{ mTransferBitsOut[tctype] += bits; }  protected:  	LLTransferConnection		*getTransferConnection(const LLHost &host); -	BOOL						removeTransferConnection(const LLHost &host); +	bool						removeTransferConnection(const LLHost &host);  protected:  	// Convenient typedefs  	typedef std::map<LLHost, LLTransferConnection *> host_tc_map; -	BOOL	mValid; +	bool	mValid;  	LLHost	mHost;  	S32		mTransferBitsIn[LLTTT_NUM_TYPES]; @@ -408,8 +408,8 @@ protected:  	virtual S32				getNextPacketID()						{ return mLastPacketID + 1; }  	virtual void			setLastPacketID(const S32 packet_id)	{ mLastPacketID = packet_id; }  	void					setSize(const S32 size)					{ mSize = size; } -	void					setGotInfo(const BOOL got_info)			{ mGotInfo = got_info; } -	BOOL					gotInfo() const							{ return mGotInfo; } +	void					setGotInfo(const bool got_info)			{ mGotInfo = got_info; } +	bool					gotInfo() const							{ return mGotInfo; }  	bool addDelayedPacket(  		const S32 packet_id, @@ -425,7 +425,7 @@ protected:  	LLTransferSourceType mSourceType;  	LLUUID					mID;  	LLTransferTargetChannel *mChannelp; -	BOOL					mGotInfo; +	bool					mGotInfo;  	S32						mSize;  	S32						mLastPacketID; diff --git a/indra/llmessage/lltransfersourceasset.cpp b/indra/llmessage/lltransfersourceasset.cpp index 32fdc83f0e..50956aeb6d 100644 --- a/indra/llmessage/lltransfersourceasset.cpp +++ b/indra/llmessage/lltransfersourceasset.cpp @@ -36,7 +36,7 @@  LLTransferSourceAsset::LLTransferSourceAsset(const LLUUID &request_id, const F32 priority) :  	LLTransferSource(LLTST_ASSET, request_id, priority), -	mGotResponse(FALSE), +	mGotResponse(false),  	mCurPos(0)  {  } @@ -120,7 +120,7 @@ LLTSCode LLTransferSourceAsset::dataCallback(const S32 packet_id,  		return LLTS_ERROR;  	} -	delete_returned = TRUE; +	delete_returned = true;  	U8 *tmpp = new U8[max_bytes];  	*data_handle = tmpp;  	if (!vf.read(tmpp, max_bytes))		/* Flawfinder: Ignore */ @@ -129,7 +129,7 @@ LLTSCode LLTransferSourceAsset::dataCallback(const S32 packet_id,  		delete[] tmpp;  		*data_handle = NULL;  		returned_bytes = 0; -		delete_returned = FALSE; +		delete_returned = false;  		return LLTS_ERROR;  	} @@ -144,7 +144,7 @@ LLTSCode LLTransferSourceAsset::dataCallback(const S32 packet_id,  			delete[] tmpp;  			*data_handle = NULL;  			returned_bytes = 0; -			delete_returned = FALSE; +			delete_returned = false;  		}  		return LLTS_DONE;  	} @@ -194,7 +194,7 @@ void LLTransferSourceAsset::responderCallback(const LLUUID& uuid, LLAssetType::E  	LLTSCode status; -	tsap->mGotResponse = TRUE; +	tsap->mGotResponse = true;  	if (LL_ERR_NOERR == result)  	{  		// Everything's OK. diff --git a/indra/llmessage/lltransfersourcefile.cpp b/indra/llmessage/lltransfersourcefile.cpp index 1192a6e461..ccf0dd7fe0 100644 --- a/indra/llmessage/lltransfersourcefile.cpp +++ b/indra/llmessage/lltransfersourcefile.cpp @@ -102,7 +102,7 @@ LLTSCode LLTransferSourceFile::dataCallback(const S32 packet_id,  	}  	// Grab up until the max number of bytes from the file. -	delete_returned = TRUE; +	delete_returned = true;  	U8 *tmpp = new U8[max_bytes];  	*data_handle = tmpp;  	returned_bytes = (S32)fread(tmpp, 1, max_bytes, mFP); @@ -111,7 +111,7 @@ LLTSCode LLTransferSourceFile::dataCallback(const S32 packet_id,  		delete[] tmpp;  		*data_handle = NULL;  		returned_bytes = 0; -		delete_returned = FALSE; +		delete_returned = false;  		return LLTS_DONE;  	} diff --git a/indra/llmessage/lltransfersourcefile.h b/indra/llmessage/lltransfersourcefile.h index bda6bad14f..60100e5a65 100644 --- a/indra/llmessage/lltransfersourcefile.h +++ b/indra/llmessage/lltransfersourcefile.h @@ -40,12 +40,12 @@ public:  	void setFilename(const std::string &filename)		{ mFilename = filename; }  	std::string getFilename() const					{ return mFilename; } -	void setDeleteOnCompletion(BOOL enabled)		{ mDeleteOnCompletion = enabled; } -	BOOL getDeleteOnCompletion()					{ return mDeleteOnCompletion; } +	void setDeleteOnCompletion(bool enabled)		{ mDeleteOnCompletion = enabled; } +	bool getDeleteOnCompletion()					{ return mDeleteOnCompletion; }  protected:  	std::string mFilename;  	// ONLY DELETE THINGS OFF THE SIM IF THE FILENAME BEGINS IN 'TEMP' -	BOOL mDeleteOnCompletion; +	bool mDeleteOnCompletion;  };  class LLTransferSourceFile : public LLTransferSource diff --git a/indra/llmessage/lltransfertargetvfile.cpp b/indra/llmessage/lltransfertargetvfile.cpp index f6faadf87f..2806e08ebd 100644 --- a/indra/llmessage/lltransfertargetvfile.cpp +++ b/indra/llmessage/lltransfertargetvfile.cpp @@ -94,7 +94,7 @@ LLTransferTargetVFile::LLTransferTargetVFile(  	const LLUUID& uuid,  	LLTransferSourceType src_type) :  	LLTransferTarget(LLTTT_VFILE, uuid, src_type), -	mNeedsCreate(TRUE) +	mNeedsCreate(true)  {  	mTempID.generate();  } @@ -141,7 +141,7 @@ LLTSCode LLTransferTargetVFile::dataCallback(const S32 packet_id, U8 *in_datap,  	LLFileSystem vf(mTempID, mParams.getAssetType(), LLFileSystem::APPEND);  	if (mNeedsCreate)  	{ -		mNeedsCreate = FALSE; +		mNeedsCreate = false;  	}  	if (!in_size) diff --git a/indra/llmessage/lltransfertargetvfile.h b/indra/llmessage/lltransfertargetvfile.h index 39a9125f1b..2e6e5a8d40 100644 --- a/indra/llmessage/lltransfertargetvfile.h +++ b/indra/llmessage/lltransfertargetvfile.h @@ -86,7 +86,7 @@ protected:  	LLTransferTargetParamsVFile mParams; -	BOOL mNeedsCreate; +	bool mNeedsCreate;  	LLUUID mTempID;  }; diff --git a/indra/llmessage/lluseroperation.cpp b/indra/llmessage/lluseroperation.cpp index d56997c7de..3e387d3d5e 100644 --- a/indra/llmessage/lluseroperation.cpp +++ b/indra/llmessage/lluseroperation.cpp @@ -41,7 +41,7 @@ LLUserOperationMgr* gUserOperationMgr = NULL;  LLUserOperation::LLUserOperation(const LLUUID& agent_id)  :	mAgentID(agent_id),  	mTimer(), -	mNoExpire(FALSE) +	mNoExpire(false)  {  	mTransactionID.generate();  } @@ -51,7 +51,7 @@ LLUserOperation::LLUserOperation(const LLUUID& agent_id,  	mAgentID(agent_id),  	mTransactionID(transaction_id),  	mTimer(), -	mNoExpire(FALSE) +	mNoExpire(false)  {  } @@ -59,7 +59,7 @@ LLUserOperation::LLUserOperation(const LLUUID& agent_id,  // transaction, agent, et. after construction.  LLUserOperation::LLUserOperation() :  	mTimer(), -	mNoExpire(FALSE) +	mNoExpire(false)  {  } @@ -67,7 +67,7 @@ LLUserOperation::~LLUserOperation()  {  } -void LLUserOperation::SetNoExpireFlag(const BOOL flag) +void LLUserOperation::SetNoExpireFlag(const bool flag)  {  	mNoExpire = flag;  } diff --git a/indra/llmessage/lluseroperation.h b/indra/llmessage/lluseroperation.h index 88e5f82622..9d0f4d04d1 100644 --- a/indra/llmessage/lluseroperation.h +++ b/indra/llmessage/lluseroperation.h @@ -47,14 +47,14 @@ public:  	virtual bool isExpired();  	// ability to mark this operation as never expiring. -	void SetNoExpireFlag(const BOOL flag); +	void SetNoExpireFlag(const bool flag);  	// Send request to the dataserver  	virtual void sendRequest() = 0;  	// Run the operation. This will only be called in the case of an  	// actual success or failure of the operation. -	virtual bool execute(BOOL transaction_success) = 0; +	virtual bool execute(bool transaction_success) = 0;  	// This method is called when the user op has expired, and is  	// about to be deleted by the manager. This gives the user op the diff --git a/indra/llmessage/llxfer.cpp b/indra/llmessage/llxfer.cpp index ad291df717..854f5664f0 100644 --- a/indra/llmessage/llxfer.cpp +++ b/indra/llmessage/llxfer.cpp @@ -63,13 +63,13 @@ void LLXfer::init (S32 chunk_size)  	mXferSize = 0;  	mStatus = e_LL_XFER_UNINITIALIZED; -	mWaitingForACK = FALSE; +	mWaitingForACK = false;  	mCallback = NULL;  	mCallbackDataHandle = NULL;  	mCallbackResult = 0; -	mBufferContainsEOF = FALSE; +	mBufferContainsEOF = false;  	mBuffer = NULL;  	mBufferLength = 0;  	mBufferStartOffset = 0; @@ -187,7 +187,7 @@ void LLXfer::sendPacket(S32 packet_num)  {  	char fdata_buf[LL_XFER_LARGE_PAYLOAD+4];		/* Flawfinder: ignore */  	S32 fdata_size = mChunkSize; -	BOOL last_packet = FALSE; +	bool last_packet = false;  	S32 num_copy = 0;  	// if the desired packet is not in our current buffered excerpt from the file. . .  @@ -217,7 +217,7 @@ void LLXfer::sendPacket(S32 packet_num)  	if (((U32)(desired_read_position + fdata_size) >= (U32)mBufferLength) && (mBufferContainsEOF))  	{ -		last_packet = TRUE; +		last_packet = true;  	}  	if (packet_num) @@ -270,7 +270,7 @@ void LLXfer::sendPacket(S32 packet_num)  		}  		ACKTimer.reset(); -		mWaitingForACK = TRUE; +		mWaitingForACK = true;  	}  	if (last_packet)  	{ diff --git a/indra/llmessage/llxfer.h b/indra/llmessage/llxfer.h index cfd9f83d54..6b236df1a5 100644 --- a/indra/llmessage/llxfer.h +++ b/indra/llmessage/llxfer.h @@ -63,11 +63,11 @@ class LLXfer  	char *mBuffer;  	U32 mBufferLength;			// Size of valid data, not actual allocated buffer size  	U32 mBufferStartOffset; -	BOOL mBufferContainsEOF; +	bool mBufferContainsEOF;  	ELLXferStatus mStatus; -	BOOL mWaitingForACK; +	bool mWaitingForACK;  	void (*mCallback)(void **,S32,LLExtStat);	  	void **mCallbackDataHandle; diff --git a/indra/llmessage/llxfer_file.cpp b/indra/llmessage/llxfer_file.cpp index f5e9071aa4..ef2915ede3 100644 --- a/indra/llmessage/llxfer_file.cpp +++ b/indra/llmessage/llxfer_file.cpp @@ -49,10 +49,10 @@ S32 copy_file(const std::string& from, const std::string& to);  LLXfer_File::LLXfer_File (S32 chunk_size)  : LLXfer(chunk_size)  { -	init(LLStringUtil::null, FALSE, chunk_size); +	init(LLStringUtil::null, false, chunk_size);  } -LLXfer_File::LLXfer_File (const std::string& local_filename, BOOL delete_local_on_completion, S32 chunk_size) +LLXfer_File::LLXfer_File (const std::string& local_filename, bool delete_local_on_completion, S32 chunk_size)  : LLXfer(chunk_size)  {  	init(local_filename, delete_local_on_completion, chunk_size); @@ -67,7 +67,7 @@ LLXfer_File::~LLXfer_File ()  /////////////////////////////////////////////////////////// -void LLXfer_File::init (const std::string& local_filename, BOOL delete_local_on_completion, S32 chunk_size) +void LLXfer_File::init (const std::string& local_filename, bool delete_local_on_completion, S32 chunk_size)  {  	mFp = NULL; @@ -75,8 +75,8 @@ void LLXfer_File::init (const std::string& local_filename, BOOL delete_local_on_  	mRemoteFilename.clear();  	mRemotePath = LL_PATH_NONE;  	mTempFilename.clear(); -	mDeleteLocalOnCompletion = FALSE; -	mDeleteRemoteOnCompletion = FALSE; +	mDeleteLocalOnCompletion = false; +	mDeleteRemoteOnCompletion = false;  	if (!local_filename.empty())  	{ @@ -120,7 +120,7 @@ S32 LLXfer_File::initializeRequest(U64 xfer_id,  				   const std::string& remote_filename,  				   ELLPath remote_path,  				   const LLHost& remote_host, -				   BOOL delete_remote_on_completion, +				   bool delete_remote_on_completion,  				   void (*callback)(void**,S32,LLExtStat),  				   void** user_data)  { @@ -174,7 +174,7 @@ S32 LLXfer_File::startDownload()  		gMessageSystem->addStringFast(_PREHASH_Filename, mRemoteFilename);  		gMessageSystem->addU8("FilePath", (U8) mRemotePath);  		gMessageSystem->addBOOL("DeleteOnCompletion", mDeleteRemoteOnCompletion); -		gMessageSystem->addBOOL("UseBigPackets", BOOL(mChunkSize == LL_XFER_LARGE_PAYLOAD)); +		gMessageSystem->addBOOL("UseBigPackets", mChunkSize == LL_XFER_LARGE_PAYLOAD);  		gMessageSystem->addUUIDFast(_PREHASH_VFileID, LLUUID::null);  		gMessageSystem->addS16Fast(_PREHASH_VFileType, -1); @@ -287,11 +287,11 @@ S32 LLXfer_File::suck(S32 start_position)  		if (feof(mFp))  		{ -			mBufferContainsEOF = TRUE; +			mBufferContainsEOF = true;  		}  		else  		{ -			mBufferContainsEOF = FALSE; +			mBufferContainsEOF = false;  		}		  	}  	else diff --git a/indra/llmessage/llxfer_file.h b/indra/llmessage/llxfer_file.h index 15a0120932..24bfd993bd 100644 --- a/indra/llmessage/llxfer_file.h +++ b/indra/llmessage/llxfer_file.h @@ -39,15 +39,15 @@ class LLXfer_File : public LLXfer  	ELLPath mRemotePath;  	std::string mTempFilename; -	BOOL mDeleteLocalOnCompletion; -	BOOL mDeleteRemoteOnCompletion; +	bool mDeleteLocalOnCompletion; +	bool mDeleteRemoteOnCompletion;   public:  	LLXfer_File (S32 chunk_size); -	LLXfer_File (const std::string& local_filename, BOOL delete_local_on_completion, S32 chunk_size); +	LLXfer_File (const std::string& local_filename, bool delete_local_on_completion, S32 chunk_size);  	virtual ~LLXfer_File(); -	virtual void init(const std::string& local_filename, BOOL delete_local_on_completion, S32 chunk_size); +	virtual void init(const std::string& local_filename, bool delete_local_on_completion, S32 chunk_size);  	virtual void cleanup();  	virtual S32 initializeRequest(U64 xfer_id, @@ -55,7 +55,7 @@ class LLXfer_File : public LLXfer  								  const std::string& remote_filename,  								  ELLPath remote_path,  								  const LLHost& remote_host, -								  BOOL delete_remote_on_completion, +								  bool delete_remote_on_completion,  								  void (*callback)(void**,S32,LLExtStat),  								  void** user_data);  	virtual S32 startDownload(); diff --git a/indra/llmessage/llxfer_mem.cpp b/indra/llmessage/llxfer_mem.cpp index da8534ecdc..42afaad93b 100644 --- a/indra/llmessage/llxfer_mem.cpp +++ b/indra/llmessage/llxfer_mem.cpp @@ -52,7 +52,7 @@ void LLXfer_Mem::init ()  {  	mRemoteFilename.clear();  	mRemotePath = LL_PATH_NONE; -	mDeleteRemoteOnCompletion = FALSE; +	mDeleteRemoteOnCompletion = false;  }  /////////////////////////////////////////////////////////// @@ -73,7 +73,7 @@ void LLXfer_Mem::setXferSize (S32 xfer_size)  	mBufferLength = 0;  	mBufferStartOffset = 0;	 -	mBufferContainsEOF = TRUE; +	mBufferContainsEOF = true;  //	cout << "starting transfer of size: " << xfer_size << endl;  } @@ -124,7 +124,7 @@ S32 LLXfer_Mem::initializeRequest(U64 xfer_id,  								  const std::string& remote_filename,  								  ELLPath remote_path,  								  const LLHost& remote_host, -								  BOOL delete_remote_on_completion, +								  bool delete_remote_on_completion,  								  void (*callback)(void*,S32,void**,S32,LLExtStat),  								  void** user_data)  { @@ -164,7 +164,7 @@ S32 LLXfer_Mem::startDownload()  	gMessageSystem->addStringFast(_PREHASH_Filename, mRemoteFilename);  	gMessageSystem->addU8("FilePath", (U8) mRemotePath);  	gMessageSystem->addBOOL("DeleteOnCompletion", mDeleteRemoteOnCompletion); -	gMessageSystem->addBOOL("UseBigPackets", BOOL(mChunkSize == LL_XFER_LARGE_PAYLOAD)); +	gMessageSystem->addBOOL("UseBigPackets", mChunkSize == LL_XFER_LARGE_PAYLOAD);  	gMessageSystem->addUUIDFast(_PREHASH_VFileID, LLUUID::null);  	gMessageSystem->addS16Fast(_PREHASH_VFileType, -1); diff --git a/indra/llmessage/llxfer_mem.h b/indra/llmessage/llxfer_mem.h index d07779de87..25bd363235 100644 --- a/indra/llmessage/llxfer_mem.h +++ b/indra/llmessage/llxfer_mem.h @@ -39,7 +39,7 @@ class LLXfer_Mem : public LLXfer  	void (*mCallback)(void *, S32, void **, S32, LLExtStat);	  	std::string mRemoteFilename;  	ELLPath mRemotePath; -	BOOL mDeleteRemoteOnCompletion; +	bool mDeleteRemoteOnCompletion;   public: @@ -59,7 +59,7 @@ class LLXfer_Mem : public LLXfer  								  const std::string& remote_filename,  								  ELLPath remote_path,  								  const LLHost& remote_host, -								  BOOL delete_remote_on_completion, +								  bool delete_remote_on_completion,  								  void (*callback)(void*,S32,void**,S32,LLExtStat),  								  void** user_data);  	virtual S32 startDownload(); diff --git a/indra/llmessage/llxfer_vfile.cpp b/indra/llmessage/llxfer_vfile.cpp index f478825d97..3322188694 100644 --- a/indra/llmessage/llxfer_vfile.cpp +++ b/indra/llmessage/llxfer_vfile.cpp @@ -138,7 +138,7 @@ S32 LLXfer_VFile::initializeRequest(U64 xfer_id,  	mBufferLength = 0;  	mPacketNum = 0;  	mTempID.generate(); -	mDeleteTempFile = TRUE; +	mDeleteTempFile = true;   	mStatus = e_LL_XFER_PENDING;  	return retval;  } @@ -156,8 +156,8 @@ S32 LLXfer_VFile::startDownload()  	gMessageSystem->addU64Fast(_PREHASH_ID, mID);  	gMessageSystem->addStringFast(_PREHASH_Filename, "");  	gMessageSystem->addU8("FilePath", (U8) LL_PATH_NONE); -	gMessageSystem->addBOOL("DeleteOnCompletion", FALSE); -	gMessageSystem->addBOOL("UseBigPackets", BOOL(mChunkSize == LL_XFER_LARGE_PAYLOAD)); +	gMessageSystem->addBOOL("DeleteOnCompletion", false); +	gMessageSystem->addBOOL("UseBigPackets", mChunkSize == LL_XFER_LARGE_PAYLOAD);  	gMessageSystem->addUUIDFast(_PREHASH_VFileID, mRemoteID);  	gMessageSystem->addS16Fast(_PREHASH_VFileType, (S16)mType); @@ -345,7 +345,7 @@ S32 LLXfer_VFile::processEOF()  			{									  				// Rename worked: the original file is gone.   Clear mDeleteTempFile  				// so we don't attempt to delete the file in cleanup() -				mDeleteTempFile = FALSE; +				mDeleteTempFile = false;  			}  		}  		else diff --git a/indra/llmessage/llxfer_vfile.h b/indra/llmessage/llxfer_vfile.h index 71eaeb7393..032c5e2533 100644 --- a/indra/llmessage/llxfer_vfile.h +++ b/indra/llmessage/llxfer_vfile.h @@ -44,7 +44,7 @@ class LLXfer_VFile : public LLXfer  	std::string mName; -	BOOL	mDeleteTempFile; +	bool	mDeleteTempFile;   public:  	LLXfer_VFile (); diff --git a/indra/llmessage/llxfermanager.cpp b/indra/llmessage/llxfermanager.cpp index 591dbc18c2..6187d439d9 100644 --- a/indra/llmessage/llxfermanager.cpp +++ b/indra/llmessage/llxfermanager.cpp @@ -79,7 +79,7 @@ void LLXferManager::init()  	setMaxIncomingXfers(LL_DEFAULT_MAX_REQUEST_FIFO_XFERS);  	// Turn on or off ack throttling -	mUseAckThrottling = FALSE; +	mUseAckThrottling = false;  	setAckThrottleBPS(100000);  } @@ -116,7 +116,7 @@ void LLXferManager::setHardLimitOutgoingXfersPerCircuit(S32 max_num)  	mHardLimitOutgoingXfersPerCircuit = max_num;  } -void LLXferManager::setUseAckThrottling(const BOOL use) +void LLXferManager::setUseAckThrottling(const bool use)  {  	mUseAckThrottling = use;  } @@ -1005,7 +1005,7 @@ void LLXferManager::processConfirmation (LLMessageSystem *mesgsys, void ** /*use  	if (xferp)  	{  //		cout << "confirmed packet #" << packetNum << " ping: "<< xferp->ACKTimer.getElapsedTimeF32() <<  endl; -		xferp->mWaitingForACK = FALSE; +		xferp->mWaitingForACK = false;  		if (xferp->mStatus == e_LL_XFER_IN_PROGRESS)  		{  			xferp->sendNextPacket(); diff --git a/indra/llmessage/llxfermanager.h b/indra/llmessage/llxfermanager.h index 17625aedfa..5b42e781eb 100644 --- a/indra/llmessage/llxfermanager.h +++ b/indra/llmessage/llxfermanager.h @@ -76,7 +76,7 @@ class LLXferManager  	S32    mHardLimitOutgoingXfersPerCircuit;	// At this limit, kill off the connection  	S32    mMaxIncomingXfers; -	BOOL	mUseAckThrottling; // Use ack throttling to cap file xfer bandwidth +	bool	mUseAckThrottling; // Use ack throttling to cap file xfer bandwidth  	std::deque<LLXferAckInfo> mXferAckQueue;  	LLThrottle mAckThrottle;   public: @@ -85,8 +85,8 @@ class LLXferManager  	// an xfer must happen asap.  	enum  	{ -		LOW_PRIORITY = FALSE, -		HIGH_PRIORITY = TRUE, +		LOW_PRIORITY = false, +		HIGH_PRIORITY = true,  	};  	// Linked FIFO list, add to the front and pull from back @@ -113,7 +113,7 @@ class LLXferManager  	virtual void init();  	virtual void cleanup(); -	void setUseAckThrottling(const BOOL use); +	void setUseAckThrottling(const bool use);  	void setAckThrottleBPS(const F32 bps);  // list management routines diff --git a/indra/llmessage/llxorcipher.h b/indra/llmessage/llxorcipher.h index c5b0700f0d..cd1fed3ba4 100644 --- a/indra/llmessage/llxorcipher.h +++ b/indra/llmessage/llxorcipher.h @@ -43,18 +43,18 @@ public:  	LLXORCipher& operator=(const LLXORCipher& cipher);  	// Cipher functions -	/*virtual*/ U32 encrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len); -	/*virtual*/ U32 decrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len); -	/*virtual*/ U32 requiredEncryptionSpace(U32 src_len) const; +	U32 encrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len) override; +	U32 decrypt(const U8* src, U32 src_len, U8* dst, U32 dst_len) override; +	U32 requiredEncryptionSpace(U32 src_len) const override;  	// special syntactic-sugar since xor can be performed in place. -	BOOL encrypt(U8* buf, U32 len) { return encrypt((const U8*)buf, len, buf, len); } -	BOOL decrypt(U8* buf, U32 len) { return decrypt((const U8*)buf, len, buf, len); } +	bool encrypt(U8* buf, U32 len) { return encrypt((const U8*)buf, len, buf, len) > 0; } +	bool decrypt(U8* buf, U32 len) { return decrypt((const U8*)buf, len, buf, len) > 0; }  #ifdef _DEBUG  	// This function runs tests to make sure the crc is -	// working. Returns TRUE if it is. -	static BOOL testHarness(); +	// working. Returns true if it is. +	static bool testHarness();  #endif  protected: diff --git a/indra/llmessage/machine.h b/indra/llmessage/machine.h index 07aadd47d2..6505a88639 100644 --- a/indra/llmessage/machine.h +++ b/indra/llmessage/machine.h @@ -65,7 +65,7 @@ public:  	// The control port is the listen port of the parent process that  	// launched this machine. 0 means none or not known.  	const S32		&getControlPort() 	const { return mControlPort; } -	BOOL			isValid()			const { return (mHost.getPort() != 0); }	// TRUE if corresponds to functioning machine +	bool			isValid()			const { return (mHost.getPort() != 0); }	// TRUE if corresponds to functioning machine  	// set functions  	void			setMachineType(EMachineType machine_type)	{ mMachineType = machine_type; } diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp index d11efab7ab..91a1250857 100644 --- a/indra/llmessage/message.cpp +++ b/indra/llmessage/message.cpp @@ -148,11 +148,11 @@ static const char* nullToEmpty(const char* s)  void LLMessageSystem::init()  {  	// initialize member variables -	mVerboseLog = FALSE; +	mVerboseLog = false; -	mbError = FALSE; +	mbError = false;  	mErrorCode = 0; -	mSendReliable = FALSE; +	mSendReliable = false;  	mUnackedListDepth = 0;  	mUnackedListSize = 0; @@ -214,7 +214,7 @@ LLMessageSystem::LLMessageSystem(const std::string& filename, U32 port,  	mVersionFlags = 0x0;  	// default to not accepting packets from not alive circuits -	mbProtected = TRUE; +	mbProtected = true;  	// default to blocking trusted connections on a public interface if one is specified  	mBlockUntrustedInterface = true; @@ -239,7 +239,7 @@ LLMessageSystem::LLMessageSystem(const std::string& filename, U32 port,  	S32 error = start_net(mSocket, mPort);  	if (error != 0)  	{ -		mbError = TRUE; +		mbError = true;  		mErrorCode = error;  	}  //	LL_DEBUGS("Messaging") <<  << "*** port: " << mPort << LL_ENDL; @@ -288,7 +288,7 @@ void LLMessageSystem::loadTemplateFile(const std::string& filename, bool failure  	if(filename.empty())  	{  		LL_ERRS("Messaging") << "No template filename specified" << LL_ENDL; -		mbError = TRUE; +		mbError = true;  		return;  	} @@ -300,7 +300,7 @@ void LLMessageSystem::loadTemplateFile(const std::string& filename, bool failure  		} else {  			LL_WARNS("Messaging") << "Failed to open template: " << filename << LL_ENDL;  		} -		mbError = TRUE; +		mbError = true;  		return;  	} @@ -506,8 +506,8 @@ bool LLMessageSystem::checkMessages(LockMessageChecker&, S64 frame_count )  	{  		clearReceiveState(); -		BOOL recv_reliable = false; -		BOOL recv_resent = false; +		bool recv_reliable = false; +		bool recv_resent = false;  		S32 acks = 0;  		S32 true_rcv_size = 0; @@ -768,7 +768,7 @@ void LLMessageSystem::processAcks(LockMessageChecker&, F32 collect_time)  		}  	} -	BOOL dump = FALSE; +	bool dump = false;  	{  		// Check the status of circuits  		mCircuitInfo.updateWatchDogTimers(this); @@ -793,17 +793,17 @@ void LLMessageSystem::processAcks(LockMessageChecker&, F32 collect_time)  		{  			if (mNumMessageCounts >= mMaxMessageCounts)  			{ -				dump = TRUE; +				dump = true;  			}  		}  		if (mMaxMessageTime >= F32Seconds(0.f))  		{  			// This is one of the only places where we're required to get REAL message system time. -			mReceiveTime = getMessageTimeSeconds(TRUE) - mMessageCountTime; +			mReceiveTime = getMessageTimeSeconds(true) - mMessageCountTime;  			if (mReceiveTime > mMaxMessageTime)  			{ -				dump = TRUE; +				dump = true;  			}  		}  	} @@ -833,7 +833,7 @@ void LLMessageSystem::copyMessageReceivedToSend()  	{  		mMessageBuilder = mLLSDMessageBuilder;  	} -	mSendReliable = FALSE; +	mSendReliable = false;  	mMessageBuilder->newMessage(mMessageReader->getMessageName());  	mMessageReader->copyToBuilder(*mMessageBuilder);  } @@ -928,7 +928,7 @@ S32 LLMessageSystem::sendMessage(const LLHost &host, LLStoredMessagePtr message)  void LLMessageSystem::clearMessage()  { -	mSendReliable = FALSE; +	mSendReliable = false;  	mMessageBuilder->clearMessage();  } @@ -968,7 +968,7 @@ bool LLMessageSystem::removeLastBlock()  S32 LLMessageSystem::sendReliable(const LLHost &host)  { -	return sendReliable(host, LL_DEFAULT_RELIABLE_RETRIES, TRUE, LL_PING_BASED_TIMEOUT_DUMMY, NULL, NULL); +	return sendReliable(host, LL_DEFAULT_RELIABLE_RETRIES, true, LL_PING_BASED_TIMEOUT_DUMMY, NULL, NULL);  } @@ -987,15 +987,15 @@ S32 LLMessageSystem::sendSemiReliable(const LLHost &host, void (*callback)(void  		timeout = LL_SEMIRELIABLE_TIMEOUT_FACTOR * LL_AVERAGED_PING_MAX;  	} -	const S32 retries = 0; -	const BOOL ping_based_timeout = FALSE; +	constexpr S32 retries = 0; +	constexpr bool ping_based_timeout = false;  	return sendReliable(host, retries, ping_based_timeout, timeout, callback, callback_data);  }  // send the message via a UDP packet  S32 LLMessageSystem::sendReliable(	const LLHost &host,   									S32 retries,  -									BOOL ping_based_timeout, +									bool ping_based_timeout,  									F32Seconds timeout,   									void (*callback)(void **,S32),   									void ** callback_data) @@ -1013,7 +1013,7 @@ S32 LLMessageSystem::sendReliable(	const LLHost &host,  	    }  	} -	mSendReliable = TRUE; +	mSendReliable = true;  	mReliablePacketParams.set(host, retries, ping_based_timeout, timeout,   		callback, callback_data,   		const_cast<char*>(mMessageBuilder->getMessageName())); @@ -1040,7 +1040,7 @@ void LLMessageSystem::forwardReliable(const U32 circuit_code)  S32 LLMessageSystem::forwardReliable(	const LLHost &host,   										S32 retries,  -										BOOL ping_based_timeout, +										bool ping_based_timeout,  										F32Seconds timeout,   										void (*callback)(void **,S32),   										void ** callback_data) @@ -1067,9 +1067,9 @@ S32 LLMessageSystem::flushSemiReliable(const LLHost &host, void (*callback)(void  	S32 send_bytes = 0;  	if (mMessageBuilder->getMessageSize())  	{ -		mSendReliable = TRUE; +		mSendReliable = true;  		// No need for ping-based retry as not going to retry -		mReliablePacketParams.set(host, 0, FALSE, timeout, callback,  +		mReliablePacketParams.set(host, 0, false, timeout, callback,   								  callback_data,   								  const_cast<char*>(mMessageBuilder->getMessageName()));  		send_bytes = sendMessage(host); @@ -1169,7 +1169,7 @@ S32 LLMessageSystem::sendMessage(const LLHost &host)              host.getUntrustedSimulatorCap(),               mLLSDMessageBuilder->getMessageName(), message, cb)); -		mSendReliable = FALSE; +		mSendReliable = false;  		mReliablePacketParams.clear();  		return 1;  	} @@ -1218,7 +1218,7 @@ S32 LLMessageSystem::sendMessage(const LLHost &host)  	// tack packet acks onto the end of this message  	S32 space_left = (MTUBYTES - buffer_length) / sizeof(TPACKETID); // space left for packet ids  	S32 ack_count = (S32)cdp->mAcks.size(); -	BOOL is_ack_appended = FALSE; +	bool is_ack_appended = false;  	std::vector<TPACKETID> acks;  	if((space_left > 0) && (ack_count > 0) &&   	   (mMessageBuilder->getMessageName() != _PREHASH_PacketAck)) @@ -1269,10 +1269,10 @@ S32 LLMessageSystem::sendMessage(const LLHost &host)  		// tack the count in the final byte  		U8 count = (U8)append_ack_count;  		buf_ptr[buffer_length++] = count; -		is_ack_appended = TRUE; +		is_ack_appended = true;  	} -	BOOL success; +	bool success;  	success = mPacketRing.sendPacket(mSocket, (char *)buf_ptr, buffer_length, host);  	if (!success) @@ -1307,12 +1307,12 @@ S32 LLMessageSystem::sendMessage(const LLHost &host)  	mPacketsOut++;  	mTotalBytesOut += buffer_length; -	mSendReliable = FALSE; +	mSendReliable = false;  	mReliablePacketParams.clear();  	return buffer_length;  } -void LLMessageSystem::logMsgFromInvalidCircuit( const LLHost& host, BOOL recv_reliable ) +void LLMessageSystem::logMsgFromInvalidCircuit( const LLHost& host, bool recv_reliable )  {  	if(mVerboseLog)  	{ @@ -1339,7 +1339,7 @@ void LLMessageSystem::logMsgFromInvalidCircuit( const LLHost& host, BOOL recv_re  		// TODO: babbage: work out if we need these  		// mMessageCountList[mNumMessageCounts].mMessageNum = mCurrentRMessageTemplate->mMessageNumber;  		mMessageCountList[mNumMessageCounts].mMessageBytes = mMessageReader->getMessageSize(); -		mMessageCountList[mNumMessageCounts].mInvalid = TRUE; +		mMessageCountList[mNumMessageCounts].mInvalid = true;  		mNumMessageCounts++;  	}  } @@ -1392,12 +1392,12 @@ void LLMessageSystem::logTrustedMsgFromUntrustedCircuit( const LLHost& host )  		//	= mCurrentRMessageTemplate->mMessageNumber;  		mMessageCountList[mNumMessageCounts].mMessageBytes  			= mMessageReader->getMessageSize(); -		mMessageCountList[mNumMessageCounts].mInvalid = TRUE; +		mMessageCountList[mNumMessageCounts].mInvalid = true;  		mNumMessageCounts++;  	}  } -void LLMessageSystem::logValidMsg(LLCircuitData *cdp, const LLHost& host, BOOL recv_reliable, BOOL recv_resent, BOOL recv_acks ) +void LLMessageSystem::logValidMsg(LLCircuitData *cdp, const LLHost& host, bool recv_reliable, bool recv_resent, bool recv_acks )  {  	if (mNumMessageCounts >= MAX_MESSAGE_COUNT_NUM)  	{ @@ -1408,7 +1408,7 @@ void LLMessageSystem::logValidMsg(LLCircuitData *cdp, const LLHost& host, BOOL r  		// TODO: babbage: work out if we need these  		//mMessageCountList[mNumMessageCounts].mMessageNum = mCurrentRMessageTemplate->mMessageNumber;  		mMessageCountList[mNumMessageCounts].mMessageBytes = mMessageReader->getMessageSize(); -		mMessageCountList[mNumMessageCounts].mInvalid = FALSE; +		mMessageCountList[mNumMessageCounts].mInvalid = false;  		mNumMessageCounts++;  	} @@ -1502,7 +1502,7 @@ void LLMessageSystem::getCircuitInfo(LLSD& info) const  }  // returns whether the given host is on a trusted circuit -BOOL    LLMessageSystem::getCircuitTrust(const LLHost &host) +bool    LLMessageSystem::getCircuitTrust(const LLHost &host)  {  	LLCircuitData *cdp = mCircuitInfo.findCircuit(host);  	if (cdp) @@ -1510,12 +1510,12 @@ BOOL    LLMessageSystem::getCircuitTrust(const LLHost &host)  		return cdp->getTrusted();  	} -	return FALSE; +	return false;  }  // Activate a circuit, and set its trust level (TRUE if trusted,  // FALSE if not). -void LLMessageSystem::enableCircuit(const LLHost &host, BOOL trusted) +void LLMessageSystem::enableCircuit(const LLHost &host, bool trusted)  {  	LLCircuitData *cdp = mCircuitInfo.findCircuit(host);  	if (!cdp) @@ -1576,7 +1576,7 @@ void LLMessageSystem::disableCircuit(const LLHost &host)  } -void LLMessageSystem::setCircuitAllowTimeout(const LLHost &host, BOOL allow) +void LLMessageSystem::setCircuitAllowTimeout(const LLHost &host, bool allow)  {  	LLCircuitData *cdp = mCircuitInfo.findCircuit(host);  	if (cdp) @@ -1654,7 +1654,7 @@ bool LLMessageSystem::checkCircuitAlive(const LLHost &host)  } -void LLMessageSystem::setCircuitProtection(BOOL b_protect) +void LLMessageSystem::setCircuitProtection(bool b_protect)  {  	mbProtected = b_protect;  } @@ -1782,7 +1782,7 @@ void	open_circuit(LLMessageSystem *msgsystem, void** /*user_data*/)  	msgsystem->getIPPortFast(_PREHASH_CircuitInfo, _PREHASH_Port, port);  	// By default, OpenCircuit's are untrusted -	msgsystem->enableCircuit(LLHost(ip, port), FALSE); +	msgsystem->enableCircuit(LLHost(ip, port), false);  }  void	close_circuit(LLMessageSystem *msgsystem, void** /*user_data*/) @@ -1947,9 +1947,9 @@ void LLMessageSystem::processUseCircuitCode(LLMessageSystem* msg,  		// passed the circuit code and session id check, so we will go  		// ahead and persist the ID associated.  		LLCircuitData *cdp = msg->mCircuitInfo.findCircuit(msg->getSender()); -		BOOL had_circuit_already = cdp ? TRUE : FALSE; +		bool had_circuit_already = cdp ? true : false; -		msg->enableCircuit(msg->getSender(), FALSE); +		msg->enableCircuit(msg->getSender(), false);  		cdp = msg->mCircuitInfo.findCircuit(msg->getSender());  		if(cdp)  		{ @@ -1973,7 +1973,7 @@ void LLMessageSystem::processUseCircuitCode(LLMessageSystem* msg,  			// doesn't get properly duplicate suppressed.  Not a BIG deal, but it's somewhat confusing  			// (and bad from a state point of view).  DJS 9/23/04  			// -			cdp->checkPacketInID(gMessageSystem->mCurrentRecvPacketID, FALSE ); // Since this is the first message on the circuit, by definition it's not resent. +			cdp->checkPacketInID(gMessageSystem->mCurrentRecvPacketID, false ); // Since this is the first message on the circuit, by definition it's not resent.  		}  		msg->mIPPortToCircuitCode[ip_port_in] = circuit_code_in; @@ -2460,13 +2460,13 @@ bool start_messaging_system(  	if (!gMessageSystem)  	{  		LL_ERRS("AppInit") << "Messaging system initialization failed." << LL_ENDL; -		return FALSE; +		return false;  	}  	// bail if system encountered an error.  	if(!gMessageSystem->isOK())  	{ -		return FALSE; +		return false;  	}  	if (b_dump_prehash_file) @@ -2517,12 +2517,12 @@ bool start_messaging_system(  	// Initialize the transfer manager  	gTransferManager.init(); -	return TRUE; +	return true;  }  void LLMessageSystem::startLogging()  { -	mVerboseLog = TRUE; +	mVerboseLog = true;  	std::ostringstream str;  	str << "START MESSAGE LOG" << std::endl;  	str << "Legend:" << std::endl; @@ -2536,7 +2536,7 @@ void LLMessageSystem::stopLogging()  {  	if(mVerboseLog)  	{ -		mVerboseLog = FALSE; +		mVerboseLog = false;  		LL_INFOS("Messaging") << "END MESSAGE LOG" << LL_ENDL;  	}  } @@ -2757,7 +2757,7 @@ S32 LLMessageSystem::zeroCodeAdjustCurrentSendTotal()  			0);  	}  	// TODO: babbage: remove this horror -	mMessageBuilder->setBuilt(FALSE); +	mMessageBuilder->setBuilt(false);  	S32 count = mSendSize; @@ -3357,7 +3357,7 @@ void LLMessageSystem::dumpPacketToLog()  //static -U64Microseconds LLMessageSystem::getMessageTimeUsecs(const BOOL update) +U64Microseconds LLMessageSystem::getMessageTimeUsecs(const bool update)  {  	if (gMessageSystem)  	{ @@ -3374,7 +3374,7 @@ U64Microseconds LLMessageSystem::getMessageTimeUsecs(const BOOL update)  }  //static -F64Seconds LLMessageSystem::getMessageTimeSeconds(const BOOL update) +F64Seconds LLMessageSystem::getMessageTimeSeconds(const bool update)  {  	if (gMessageSystem)  	{ @@ -3432,7 +3432,7 @@ void LLMessageSystem::newMessageFast(const char *name)  			mMessageBuilder = mTemplateMessageBuilder;  		}  	} -	mSendReliable = FALSE; +	mSendReliable = false;  	mMessageBuilder->newMessage(name);  } @@ -3923,7 +3923,7 @@ void LLMessageSystem::getString(const char *block, const char *var,  				  blocknum);  } -BOOL	LLMessageSystem::has(const char *blockname) const +bool	LLMessageSystem::has(const char *blockname) const  {  	return getNumberOfBlocks(blockname) > 0;  } diff --git a/indra/llmessage/message.h b/indra/llmessage/message.h index c40da26067..c167d7ff57 100644 --- a/indra/llmessage/message.h +++ b/indra/llmessage/message.h @@ -74,7 +74,7 @@ public:  	char *getString(const char *str);  	U32	 mUsed; -	BOOL mEmpty[MESSAGE_NUMBER_OF_HASH_BUCKETS]; +	bool mEmpty[MESSAGE_NUMBER_OF_HASH_BUCKETS];  	char mString[MESSAGE_NUMBER_OF_HASH_BUCKETS][MESSAGE_MAX_STRINGS_LENGTH];	/* Flawfinder: ignore */  }; @@ -296,7 +296,7 @@ class LLMessageSystem : public LLMessageSenderInterface  	LLReliablePacketParams		mReliablePacketParams;  	// Set this flag to TRUE when you want *very* verbose logs. -	BOOL						mVerboseLog; +	bool						mVerboseLog;  	F32                         mMessageFileVersionNumber; @@ -314,7 +314,7 @@ public:  	S32					mSystemVersionServer;  	U32					mVersionFlags; -	BOOL				mbProtected; +	bool				mbProtected;  	U32					mNumberHighFreqMessages;  	U32					mNumberMediumFreqMessages; @@ -347,7 +347,7 @@ public:  	S64					mTotalBytesIn;		    // total size of all uncompressed packets in  	S64					mTotalBytesOut;		    // total size of all uncompressed packets out -	BOOL                mSendReliable;              // does the outgoing message require a pos ack? +	bool                mSendReliable;              // does the outgoing message require a pos ack?  	LLCircuit 	 		mCircuitInfo;  	F64Seconds			mCircuitPrintTime;	    // used to print circuit debug info every couple minutes @@ -370,7 +370,7 @@ public:  	~LLMessageSystem(); -	BOOL isOK() const { return !mbError; } +	bool isOK() const { return !mbError; }  	S32 getErrorCode() const { return mErrorCode; }  	// Read file and build message templates filename must point to a @@ -548,7 +548,7 @@ public:  	// Use this one if you DON'T want automatic ping-based retry.  	S32	sendReliable(	const LLHost &host,   							S32 retries,  -							BOOL ping_based_retries, +							bool ping_based_retries,  							F32Seconds timeout,   							void (*callback)(void **,S32),   							void ** callback_data); @@ -568,7 +568,7 @@ public:  	S32 forwardReliable(  		const LLHost &host,   		S32 retries,  -		BOOL ping_based_timeout, +		bool ping_based_timeout,  		F32Seconds timeout,   		void (*callback)(void **,S32),   		void ** callback_data); @@ -579,7 +579,7 @@ private:  	S32		sendMessage(const LLHost &host, const char* name,  						const LLSD& message);  public: -	// BOOL	decodeData(const U8 *buffer, const LLHost &host); +	// bool	decodeData(const U8 *buffer, const LLHost &host);  	/**  	gets binary data from the current message. @@ -659,7 +659,7 @@ public:  	U32 getOurCircuitCode(); -	void	enableCircuit(const LLHost &host, BOOL trusted); +	void	enableCircuit(const LLHost &host, bool trusted);  	void	disableCircuit(const LLHost &host);  	// Use this to establish trust on startup and in response to @@ -712,20 +712,20 @@ public:  	// returns whether the given host is on a trusted circuit  	// Note:DaveH/Babbage some trusted messages can be received without a circuit -	BOOL    getCircuitTrust(const LLHost &host); +	bool    getCircuitTrust(const LLHost &host); -	void	setCircuitAllowTimeout(const LLHost &host, BOOL allow); +	void	setCircuitAllowTimeout(const LLHost &host, bool allow);  	void	setCircuitTimeoutCallback(const LLHost &host, void (*callback_func)(const LLHost &host, void *user_data), void *user_data);  	bool	checkCircuitBlocked(const U32 circuit);  	bool	checkCircuitAlive(const U32 circuit);  	bool	checkCircuitAlive(const LLHost &host); -	void	setCircuitProtection(BOOL b_protect); +	void	setCircuitProtection(bool b_protect);  	U32		findCircuitCode(const LLHost &host);  	LLHost	findHost(const U32 circuit_code);  	void	sanityCheck(); -	BOOL	has(const char *blockname) const; +	bool	has(const char *blockname) const;  	S32		getNumberOfBlocksFast(const char *blockname) const;  	S32		getNumberOfBlocks(const char *blockname) const;  	S32		getSizeFast(const char *blockname, const char *varname) const; @@ -762,8 +762,8 @@ public:  	void setMaxMessageTime(const F32 seconds);	// Max time to process messages before warning and dumping (neg to disable)  	void setMaxMessageCounts(const S32 num);	// Max number of messages before dumping (neg to disable) -	static U64Microseconds getMessageTimeUsecs(const BOOL update = FALSE);	// Get the current message system time in microseconds -	static F64Seconds getMessageTimeSeconds(const BOOL update = FALSE); // Get the current message system time in seconds +	static U64Microseconds getMessageTimeUsecs(const bool update = false);	// Get the current message system time in microseconds +	static F64Seconds getMessageTimeSeconds(const bool update = false); // Get the current message system time in seconds  	static void setTimeDecodes(bool b);  	static void setTimeDecodesSpamThreshold(F32 seconds); @@ -839,11 +839,11 @@ private:  	LLUUID mSessionID;  	void	addTemplate(LLMessageTemplate *templatep); -	BOOL		decodeTemplate( const U8* buffer, S32 buffer_size, LLMessageTemplate** msg_template ); +	bool		decodeTemplate( const U8* buffer, S32 buffer_size, LLMessageTemplate** msg_template ); -	void		logMsgFromInvalidCircuit( const LLHost& sender, BOOL recv_reliable ); +	void		logMsgFromInvalidCircuit( const LLHost& sender, bool recv_reliable );  	void		logTrustedMsgFromUntrustedCircuit( const LLHost& sender ); -	void		logValidMsg(LLCircuitData *cdp, const LLHost& sender, BOOL recv_reliable, BOOL recv_resent, BOOL recv_acks ); +	void		logValidMsg(LLCircuitData *cdp, const LLHost& sender, bool recv_reliable, bool recv_resent, bool recv_acks );  	void		logRanOffEndOfPacket( const LLHost& sender );  	class LLMessageCountInfo @@ -851,7 +851,7 @@ private:  	public:  		U32 mMessageNum;  		U32 mMessageBytes; -		BOOL mInvalid; +		bool mInvalid;  	};  	LLMessagePollInfo						*mPollInfop; @@ -862,7 +862,7 @@ private:  	// Must be valid during decode -	BOOL	mbError; +	bool	mbError;  	S32	mErrorCode;  	F64Seconds										mResendDumpTime; // The last time we dumped resends @@ -885,7 +885,7 @@ private:  	LLTimer mMessageSystemTimer;  	static F32 mTimeDecodesSpamThreshold;  // If mTimeDecodes is on, all this many seconds for each msg decode before spamming -	static BOOL mTimeDecodes;  // Measure time for all message decodes if TRUE; +	static bool mTimeDecodes;  // Measure time for all message decodes if TRUE;  	msg_timing_callback mTimingCallback;  	void* mTimingCallbackData; diff --git a/indra/llmessage/message_string_table.cpp b/indra/llmessage/message_string_table.cpp index e4f5fb3a38..8bcc452e3f 100644 --- a/indra/llmessage/message_string_table.cpp +++ b/indra/llmessage/message_string_table.cpp @@ -47,7 +47,7 @@ LLMessageStringTable::LLMessageStringTable()  {  	for (U32 i = 0; i < MESSAGE_NUMBER_OF_HASH_BUCKETS; i++)  	{ -		mEmpty[i] = TRUE; +		mEmpty[i] = true;  		mString[i][0] = 0;  	}  } @@ -75,7 +75,7 @@ char* LLMessageStringTable::getString(const char *str)  	// not found, so add!  	strncpy(mString[hash_value], str, MESSAGE_MAX_STRINGS_LENGTH);	/* Flawfinder: ignore */  	mString[hash_value][MESSAGE_MAX_STRINGS_LENGTH - 1] = 0; -	mEmpty[hash_value] = FALSE; +	mEmpty[hash_value] = false;  	mUsed++;  	if (mUsed >= MESSAGE_NUMBER_OF_HASH_BUCKETS - 1)  	{ diff --git a/indra/llmessage/net.cpp b/indra/llmessage/net.cpp index 60030bb920..e43751f23e 100644 --- a/indra/llmessage/net.cpp +++ b/indra/llmessage/net.cpp @@ -339,7 +339,7 @@ S32 receive_packet(int hSocket, char * receiveBuffer)  }  // Returns TRUE on success. -BOOL send_packet(int hSocket, const char *sendBuffer, int size, U32 recipient, int nPort) +bool send_packet(int hSocket, const char *sendBuffer, int size, U32 recipient, int nPort)  {  	//  Sends a packet to the address set in initNet  	//   @@ -364,7 +364,7 @@ BOOL send_packet(int hSocket, const char *sendBuffer, int size, U32 recipient, i  				// assume it is.  JNC 2002.01.18  				if (WSAECONNRESET == WSAGetLastError())  				{ -					return TRUE; +					return true;  				}  				LL_INFOS() << "sendto() failed to " << u32_to_ip_string(recipient) << ":" << nPort   					<< ", Error " << last_error << LL_ENDL; @@ -598,11 +598,11 @@ int receive_packet(int hSocket, char * receiveBuffer)  	return nRet;  } -BOOL send_packet(int hSocket, const char * sendBuffer, int size, U32 recipient, int nPort) +bool send_packet(int hSocket, const char * sendBuffer, int size, U32 recipient, int nPort)  {  	int		ret; -	BOOL	success; -	BOOL	resend; +	bool	success; +	bool	resend;  	S32		send_attempts = 0;  	stDstAddr.sin_addr.s_addr = recipient; @@ -616,34 +616,34 @@ BOOL send_packet(int hSocket, const char * sendBuffer, int size, U32 recipient,  		if (ret >= 0)  		{  			// successful send -			success = TRUE; -			resend = FALSE; +			success = true; +			resend = false;  		}  		else  		{  			// send failed, check to see if we should resend -			success = FALSE; +			success = false;  			if (errno == EAGAIN)  			{  				// say nothing, just repeat send  				LL_INFOS() << "sendto() reported buffer full, resending (attempt " << send_attempts << ")" << LL_ENDL;  				LL_INFOS() << inet_ntoa(stDstAddr.sin_addr) << ":" << nPort << LL_ENDL; -				resend = TRUE; +				resend = true;  			}  			else if (errno == ECONNREFUSED)  			{  				// response to ICMP connection refused message on earlier send  				LL_INFOS() << "sendto() reported connection refused, resending (attempt " << send_attempts << ")" << LL_ENDL;  				LL_INFOS() << inet_ntoa(stDstAddr.sin_addr) << ":" << nPort << LL_ENDL; -				resend = TRUE; +				resend = true;  			}  			else  			{  				// some other error  				LL_INFOS() << "sendto() failed: " << errno << ", " << strerror(errno) << LL_ENDL;  				LL_INFOS() << inet_ntoa(stDstAddr.sin_addr) << ":" << nPort << LL_ENDL; -				resend = FALSE; +				resend = false;  			}  		}  	} @@ -652,7 +652,7 @@ BOOL send_packet(int hSocket, const char * sendBuffer, int size, U32 recipient,  	if (send_attempts >= 3)  	{  		LL_INFOS() << "sendPacket() bailed out of send!" << LL_ENDL; -		return FALSE; +		return false;  	}  	return success; diff --git a/indra/llmessage/net.h b/indra/llmessage/net.h index beb67bae4e..3d45899a56 100644 --- a/indra/llmessage/net.h +++ b/indra/llmessage/net.h @@ -43,7 +43,7 @@ void	end_net(S32& socket_out);  // returns size of packet or -1 in case of error  S32		receive_packet(int hSocket, char * receiveBuffer); -BOOL	send_packet(int hSocket, const char *sendBuffer, int size, U32 recipient, int nPort);	// Returns TRUE on success. +bool	send_packet(int hSocket, const char *sendBuffer, int size, U32 recipient, int nPort);	// Returns TRUE on success.  //void	get_sender(char * tmp);  LLHost	get_sender(); diff --git a/indra/llmessage/partsyspacket.cpp b/indra/llmessage/partsyspacket.cpp index d42a7ef989..846b11a5d0 100644 --- a/indra/llmessage/partsyspacket.cpp +++ b/indra/llmessage/partsyspacket.cpp @@ -89,7 +89,7 @@ void gSetInitDataDefaults(LLPartInitData *setMe)  		setMe->mFlags[i] = 0x00;  	} -	setMe->createMe = TRUE; +	setMe->createMe = true;  	setMe->maxParticles = 25;  	setMe->initialParticles = 25; @@ -1168,7 +1168,7 @@ bool LLPartSysCompressedPacket::fromLLPartInitData(LLPartInitData *in, U32 &byte  //	llprintline("returning from \"fromLLPartInitData\" with %d bytes\n", bytesUsed); -	return TRUE; +	return true;  }  bool LLPartSysCompressedPacket::toLLPartInitData(LLPartInitData *out, U32 *bytesUsed) diff --git a/indra/llmessage/patch_code.cpp b/indra/llmessage/patch_code.cpp index 32f8d80782..c3c3e2b3b3 100644 --- a/indra/llmessage/patch_code.cpp +++ b/indra/llmessage/patch_code.cpp @@ -130,7 +130,7 @@ void code_patch(LLBitPack &bitpack, S32 *patch, S32 postquant)  {  	S32		i, j, patch_size = gPatchSize, wbits = gWordBits;  	S32		temp; -	BOOL	b_eob; +	bool	b_eob;  	if (  (postquant > patch_size*patch_size)  		||(postquant < 0)) @@ -143,16 +143,16 @@ void code_patch(LLBitPack &bitpack, S32 *patch, S32 postquant)  	for (i = 0; i < patch_size*patch_size; i++)  	{ -		b_eob = FALSE; +		b_eob = false;  		temp = patch[i];  		if (!temp)  		{ -			b_eob = TRUE; +			b_eob = true;  			for (j = i; j < patch_size*patch_size - postquant; j++)  			{  				if (patch[j])  				{ -					b_eob = FALSE; +					b_eob = false;  					break;  				}  			} diff --git a/indra/llmessage/patch_dct.cpp b/indra/llmessage/patch_dct.cpp index b5518b61ea..2144b4e712 100644 --- a/indra/llmessage/patch_dct.cpp +++ b/indra/llmessage/patch_dct.cpp @@ -85,8 +85,8 @@ S32	gCopyMatrix[LARGE_PATCH_SIZE*LARGE_PATCH_SIZE];  void build_copy_matrix(S32 size)  {  	S32 i, j, count; -	BOOL	b_diag = FALSE; -	BOOL	b_right = TRUE; +	bool	b_diag = false; +	bool	b_right = true;  	i = 0;  	j = 0; @@ -107,8 +107,8 @@ void build_copy_matrix(S32 size)  					i++;  				else  					j++; -				b_right = FALSE; -				b_diag = TRUE; +				b_right = false; +				b_diag = true;  			}  			else  			{ @@ -116,8 +116,8 @@ void build_copy_matrix(S32 size)  					j++;  				else  					i++; -				b_right = TRUE; -				b_diag = TRUE; +				b_right = true; +				b_diag = true;  			}  		}  		else @@ -129,7 +129,7 @@ void build_copy_matrix(S32 size)  				if (  (i == size - 1)  					||(j == 0))  				{ -					b_diag = FALSE; +					b_diag = false;  				}  			}  			else @@ -139,7 +139,7 @@ void build_copy_matrix(S32 size)  				if (  (i == 0)  					||(j == size - 1))  				{ -					b_diag = FALSE; +					b_diag = false;  				}  			}  		} diff --git a/indra/llmessage/patch_idct.cpp b/indra/llmessage/patch_idct.cpp index 9ce35df284..687c1734c5 100644 --- a/indra/llmessage/patch_idct.cpp +++ b/indra/llmessage/patch_idct.cpp @@ -74,8 +74,8 @@ S32	gDeCopyMatrix[LARGE_PATCH_SIZE*LARGE_PATCH_SIZE];  void build_decopy_matrix(S32 size)  {  	S32 i, j, count; -	BOOL	b_diag = FALSE; -	BOOL	b_right = TRUE; +	bool	b_diag = false; +	bool	b_right = true;  	i = 0;  	j = 0; @@ -96,8 +96,8 @@ void build_decopy_matrix(S32 size)  					i++;  				else  					j++; -				b_right = FALSE; -				b_diag = TRUE; +				b_right = false; +				b_diag = true;  			}  			else  			{ @@ -105,8 +105,8 @@ void build_decopy_matrix(S32 size)  					j++;  				else  					i++; -				b_right = TRUE; -				b_diag = TRUE; +				b_right = true; +				b_diag = true;  			}  		}  		else @@ -118,7 +118,7 @@ void build_decopy_matrix(S32 size)  				if (  (i == size - 1)  					||(j == 0))  				{ -					b_diag = FALSE; +					b_diag = false;  				}  			}  			else @@ -128,7 +128,7 @@ void build_decopy_matrix(S32 size)  				if (  (i == 0)  					||(j == size - 1))  				{ -					b_diag = FALSE; +					b_diag = false;  				}  			}  		} @@ -658,8 +658,8 @@ void decompress_patchv(LLVector3 *v, S32 *cpatch, LLPatchHeader *ph)  	F32		mult = ooq*range;  	F32		addval = mult*(F32)(1<<(prequant - 1))+hmin; -//	BOOL	b_diag = FALSE; -//	BOOL	b_right = TRUE; +//	bool	b_diag = false; +//	bool	b_right = true;  	for (i = 0; i < size*size; i++)  	{ | 
