summaryrefslogtreecommitdiff
path: root/indra/llmessage/message.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmessage/message.h')
-rw-r--r--indra/llmessage/message.h86
1 files changed, 43 insertions, 43 deletions
diff --git a/indra/llmessage/message.h b/indra/llmessage/message.h
index e25a9ea7ef..65c1e07a68 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 */
};
@@ -295,8 +295,8 @@ class LLMessageSystem : public LLMessageSenderInterface
LLPacketRing mPacketRing;
LLReliablePacketParams mReliablePacketParams;
- // Set this flag to TRUE when you want *very* verbose logs.
- BOOL mVerboseLog;
+ // Set this flag to true when you want *very* verbose logs.
+ 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
@@ -388,9 +388,9 @@ public:
// Set a callback function for a message system exception.
void setExceptionFunc(EMessageException exception, msg_exception_callback func, void* data = NULL);
- // Call the specified exception func, and return TRUE if a
- // function was found and called. Otherwise return FALSE.
- BOOL callExceptionFunc(EMessageException exception);
+ // Call the specified exception func, and return true if a
+ // function was found and called. Otherwise return false.
+ bool callExceptionFunc(EMessageException exception);
// Set a function that will be called once per packet processed with the
// hashed message name and the time spent in the processing handler function
@@ -407,18 +407,18 @@ public:
}
// This method returns true if the code is in the circuit codes map.
- BOOL isCircuitCodeKnown(U32 code) const;
+ bool isCircuitCodeKnown(U32 code) const;
// usually called in response to an AddCircuitCode message, but
// may also be called by the login process.
bool addCircuitCode(U32 code, const LLUUID& session_id);
- BOOL poll(F32 seconds); // Number of seconds that we want to block waiting for data, returns if data was received
- BOOL checkMessages(LockMessageChecker&, S64 frame_count = 0 );
+ bool poll(F32 seconds); // Number of seconds that we want to block waiting for data, returns if data was received
+ bool checkMessages(LockMessageChecker&, S64 frame_count = 0 );
void processAcks(LockMessageChecker&, F32 collect_time = 0.f);
- BOOL isMessageFast(const char *msg);
- BOOL isMessage(const char *msg)
+ bool isMessageFast(const char *msg);
+ bool isMessage(const char *msg)
{
return isMessageFast(LLMessageStringTable::getInstance()->getString(msg));
}
@@ -482,8 +482,8 @@ public:
void addBinaryDataFast(const char *varname, const void *data, S32 size);
void addBinaryData(const char *varname, const void *data, S32 size);
- void addBOOLFast( const char* varname, BOOL b); // typed, checks storage space
- void addBOOL( const char* varname, BOOL b); // typed, checks storage space
+ void addBOOLFast( const char* varname, bool b); // typed, checks storage space
+ void addBOOL( const char* varname, bool b); // typed, checks storage space
void addS8Fast( const char *varname, S8 s); // typed, checks storage space
void addS8( const char *varname, S8 s); // typed, checks storage space
void addU8Fast( const char *varname, U8 u); // typed, checks storage space
@@ -528,10 +528,10 @@ public:
// you need to go to the next block type or need to start a new
// message. Specify the current blockname to check block counts,
// otherwise the method only checks against MTU.
- BOOL isSendFull(const char* blockname = NULL);
- BOOL isSendFullFast(const char* blockname = NULL);
+ bool isSendFull(const char* blockname = NULL);
+ bool isSendFullFast(const char* blockname = NULL);
- BOOL removeLastBlock();
+ bool removeLastBlock();
//void buildMessage();
@@ -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.
@@ -599,8 +599,8 @@ public:
*/
void getBinaryDataFast(const char *blockname, const char *varname, void *datap, S32 size, S32 blocknum = 0, S32 max_size = S32_MAX);
void getBinaryData(const char *blockname, const char *varname, void *datap, S32 size, S32 blocknum = 0, S32 max_size = S32_MAX);
- void getBOOLFast( const char *block, const char *var, BOOL &data, S32 blocknum = 0);
- void getBOOL( const char *block, const char *var, BOOL &data, S32 blocknum = 0);
+ void getBOOLFast( const char *block, const char *var, bool &data, S32 blocknum = 0);
+ void getBOOL( const char *block, const char *var, bool &data, S32 blocknum = 0);
void getS8Fast( const char *block, const char *var, S8 &data, S32 blocknum = 0);
void getS8( const char *block, const char *var, S8 &data, S32 blocknum = 0);
void getU8Fast( const char *block, const char *var, U8 &data, S32 blocknum = 0);
@@ -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);
+ bool checkCircuitBlocked(const U32 circuit);
+ bool checkCircuitAlive(const U32 circuit);
+ bool checkCircuitAlive(const LLHost &host);
+ 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;
@@ -738,7 +738,7 @@ public:
void dumpReceiveCounts(); // dumps receive count for each message type to LL_INFOS()
void dumpCircuitInfo(); // Circuit information to LL_INFOS()
- BOOL isClear() const; // returns mbSClear;
+ bool isClear() const; // returns mbSClear;
S32 flush(const LLHost &host);
U32 getListenPort( void ) const;
@@ -762,11 +762,11 @@ 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);
+ static void setTimeDecodes(bool b);
+ static void setTimeDecodesSpamThreshold(F32 seconds);
// message handlers internal to the message systesm
//static void processAssignCircuitCode(LLMessageSystem* msg, void**);
@@ -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;