133 #include "../core/stdafx.hpp"
136 #include "../core/util/OTDataFolder.hpp"
137 #include "../core/util/OTFolders.hpp"
138 #include "../core/OTLog.hpp"
139 #include "../core/OTMessage.hpp"
140 #include "../core/util/OTPaths.hpp"
141 #include "../core/OTPseudonym.hpp"
142 #include "../core/OTStorage.hpp"
143 #include "../core/OTTransaction.hpp"
150 messages_.push_back(&theMessage);
182 while (!messages_.empty()) {
186 messages_.pop_front();
188 if (
nullptr == pMsg) {
189 otErr <<
"OTMessageBuffer::Pop: Error: List of incoming server "
191 "is NOT empty, yet when Pop was called, pMsg was nullptr! "
201 temp_list.push_front(
214 if (lMsgRequest == lRequestNum) {
221 otOut <<
"OTMessageBuffer::Pop: Warning: While looking for server ("
222 << strServerID <<
") reply to request number " << lRequestNum
223 <<
" for Nym (" << strNymID
225 "discovered (and discarded) an old server reply for "
226 "request number " << lMsgRequest <<
" "
229 <<
" command. The client should have flushed it by now "
230 "anyway, so it was probably slow on the network "
231 "and then assumed to have been dropped. It's okay--the "
232 "protocol is designed to handle these occurrences.)\n";
242 while (!temp_list.empty()) {
244 temp_list.pop_front();
245 messages_.push_front(pMsg);
258 while (!messages_.empty()) {
260 messages_.pop_front();
262 if (
nullptr != pMsg)
delete pMsg;
OTLOG_IMPORT OTLogStream otOut
EXPORT void Push(OTMessage &message)
EXPORT bool Compare(const char *compare) const
EXPORT OTMessage * Pop(const int64_t &requestNum, const OTString &serverId, const OTString &nymId)
EXPORT ~OTMessageBuffer()
EXPORT const char * Get() const
OTLOG_IMPORT OTLogStream otErr