removed some debug messages

This commit is contained in:
csoler 2021-02-20 20:29:30 +01:00
parent 226de56f88
commit 36e063160c
3 changed files with 9 additions and 5 deletions

View File

@ -287,16 +287,20 @@ bool MsgCircleIdsRequestVetting::cleared()
return false ; return false ;
} }
uint32_t filtered_out_msgs=0;
for(uint32_t i=0;i<mMsgs.size();) for(uint32_t i=0;i<mMsgs.size();)
if(!mCircles->isRecipient(mCircleId,mGrpId,mMsgs[i].mAuthorId)) if(!mCircles->isRecipient(mCircleId,mGrpId,mMsgs[i].mAuthorId))
{ {
std::cerr << "(WW) MsgCircleIdsRequestVetting::cleared() filtering out message " << mMsgs[i].mMsgId << " because it's signed by author " << mMsgs[i].mAuthorId << " which is not in circle " << mCircleId << std::endl; ++filtered_out_msgs;
mMsgs[i] = mMsgs[mMsgs.size()-1] ; mMsgs[i] = mMsgs[mMsgs.size()-1] ;
mMsgs.pop_back(); mMsgs.pop_back();
} }
else else
++i ; ++i ;
if(filtered_out_msgs>0)
std::cerr << "(WW) " << filtered_out_msgs << " messages not sent because they are signed by author(s) not member of that circle " << mCircleId << std::endl;
RsPgpId pgpId = mPgpUtils->getPGPId(mPeerId); RsPgpId pgpId = mPgpUtils->getPGPId(mPeerId);
bool can_send_res = mCircles->canSend(mCircleId, pgpId,mShouldEncrypt); bool can_send_res = mCircles->canSend(mCircleId, pgpId,mShouldEncrypt);

View File

@ -799,7 +799,9 @@ bool p3LinkMgrIMPL::connectResult(const RsPeerId &id, bool success, bool isIncom
bool updatePeerAddr = false; bool updatePeerAddr = false;
bool updateLastContact = false; bool updateLastContact = false;
#ifdef LINKMGR_DEBUG
std::cerr << "Connection result with peer " << id << ": " << success << ". Is incoming: " << isIncomingConnection << ", remote addr: " << sockaddr_storage_tostring(remote_peer_address) << std::endl; std::cerr << "Connection result with peer " << id << ": " << success << ". Is incoming: " << isIncomingConnection << ", remote addr: " << sockaddr_storage_tostring(remote_peer_address) << std::endl;
#endif
{ {
RsStackMutex stack(mLinkMtx); /****** STACK LOCK MUTEX *******/ RsStackMutex stack(mLinkMtx); /****** STACK LOCK MUTEX *******/

View File

@ -38,7 +38,6 @@
/**** /****
* #define POSTBASE_DEBUG 1 * #define POSTBASE_DEBUG 1
****/ ****/
#define POSTBASE_DEBUG 1
#define POSTBASE_BACKGROUND_PROCESSING 0x0002 #define POSTBASE_BACKGROUND_PROCESSING 0x0002
#define PROCESSING_START_PERIOD 30 #define PROCESSING_START_PERIOD 30
@ -630,8 +629,7 @@ void p3PostBase::background_loadMsgs(const uint32_t &token, bool unprocessed)
else else
{ {
/* unknown! */ /* unknown! */
std::cerr << "p3PostBase::background_processNewMessages() ERROR Strange NEW Message:"; std::cerr << "p3PostBase::background_processNewMessages() ERROR Strange NEW Message:" << std::endl;
std::cerr << std::endl;
std::cerr << "\t" << (*vit)->meta; std::cerr << "\t" << (*vit)->meta;
std::cerr << std::endl; std::cerr << std::endl;