removed unnecessary debug output

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8153 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-04-21 20:09:20 +00:00
parent 36506ea1e8
commit 77a33cd445
18 changed files with 216 additions and 105 deletions

View File

@ -41,9 +41,12 @@ E [X] addFriend does not work when the cert contains signatures.
E [X] PGP signatures are not transmited by discovery2. E [X] PGP signatures are not transmited by discovery2.
[X] Default appearance style on Ubuntu should be GTK (to allow correct tooltips) [X] Default appearance style on Ubuntu should be GTK (to allow correct tooltips)
[X] Default layout should use toolbars. The "menu" look is inneficient [X] Default layout should use toolbars. The "menu" look is inneficient
[ ] replace sound tooltip "sound off" by "sound is on, click to turn off"
Messages Messages
H [X] distant messages should be made async-ed H [X] distant messages should be made async-ed
* [ ] increase sigma of activity events to allow a more generous routing matrix
* [ ] collect routing events from chat lobbies? (maybe not a good idea)
M [X] distant messages are not re-sent when the peer is offline the first time M [X] distant messages are not re-sent when the peer is offline the first time
M [X] sent messages to direct peers in the Sent box have inconsistent To field. M [X] sent messages to direct peers in the Sent box have inconsistent To field.
Raises an error if you click on it. Raises an error if you click on it.
@ -60,6 +63,7 @@ H [X] marking all as read in channels takes time. The channel icon should
[X] allow to post on channels when attachment is not in shared files. Just display a warning. [X] allow to post on channels when attachment is not in shared files. Just display a warning.
M [ ] popularity calculation seems wrong. To reproduce: create a new channel and subscribe to it from M [ ] popularity calculation seems wrong. To reproduce: create a new channel and subscribe to it from
another location with many friends => popularity is too big at that location (should be 1) another location with many friends => popularity is too big at that location (should be 1)
[ ] show group owner in channel/forum/posted's details tab
Chat lobbies Chat lobbies
H [X] Chat lobbies should use Identities. That's a significant change, probably not backward compatible. H [X] Chat lobbies should use Identities. That's a significant change, probably not backward compatible.
@ -120,7 +124,7 @@ H [ ] RsGxsDataAccess::processRequests locks mDataMutex until all request
Packaging Packaging
[X] check compilation on debian [X] check compilation on debian
[X] check compilation on ARM [X] check compilation on ARM
[ ] Sound files should be part of the install package [ ] Sound files should be part of the install package at least on ubuntu (put them in /usr/share)
Post v0.6 release changes Post v0.6 release changes
========================= =========================

View File

@ -588,9 +588,11 @@ void bdNodeManager::SearchForLocalNet()
{ {
if (it->second.mQFlags & BITDHT_QFLAGS_INTERNAL) if (it->second.mQFlags & BITDHT_QFLAGS_INTERNAL)
{ {
#ifdef DEBUG_MGR
std::cerr << "bdNodeManager::SearchForLocalNet() Existing Internal Search: "; std::cerr << "bdNodeManager::SearchForLocalNet() Existing Internal Search: ";
mFns->bdPrintNodeId(std::cerr, &(it->first)); mFns->bdPrintNodeId(std::cerr, &(it->first));
std::cerr << std::endl; std::cerr << std::endl;
#endif
numSearchQueries++; numSearchQueries++;
} }

View File

@ -1045,8 +1045,9 @@ int FileIndex::saveIndex(const std::string& filename, RsFileHash &fileHash, uint
s += "-\n"; s += "-\n";
// now compress the data. // now compress the data.
#ifdef FI_DEBUG
std::cerr << "FileIndex::saveIndex(): compressign data." << std::endl; std::cerr << "FileIndex::saveIndex(): compressign data." << std::endl;
#endif
uint8_t *compressed_data = NULL ; uint8_t *compressed_data = NULL ;
uint32_t compressed_data_size = 0 ; uint32_t compressed_data_size = 0 ;
@ -1059,10 +1060,12 @@ int FileIndex::saveIndex(const std::string& filename, RsFileHash &fileHash, uint
fileHash = RsDirUtil::sha1sum((unsigned char *)compressed_data,compressed_data_size); fileHash = RsDirUtil::sha1sum((unsigned char *)compressed_data,compressed_data_size);
#ifdef FI_DEBUG
std::cerr << " file = " << filename << std::endl; std::cerr << " file = " << filename << std::endl;
std::cerr << " old size = " << s.length() << std::endl; std::cerr << " old size = " << s.length() << std::endl;
std::cerr << " new size = " << compressed_data_size << std::endl; std::cerr << " new size = " << compressed_data_size << std::endl;
std::cerr << " hash = " << fileHash << std::endl; std::cerr << " hash = " << fileHash << std::endl;
#endif
// /* calculate sha1 hash */ // /* calculate sha1 hash */
// SHA_CTX *sha_ctx = new SHA_CTX; // SHA_CTX *sha_ctx = new SHA_CTX;

View File

@ -221,9 +221,12 @@ int p3BitDht::addKnownPeer(const RsPeerId &pid, const struct sockaddr_storage &a
struct sockaddr_in addrv4; struct sockaddr_in addrv4;
if (addr.ss_family != AF_INET) if (addr.ss_family != AF_INET)
{
if(addr.ss_family != AF_UNSPEC)
{ {
std::cerr << "p3BitDht::addKnownPeer() Warning! Non IPv4 Address - Cannot handle IPV6 Yet. addr.ss_family=" << addr.ss_family; std::cerr << "p3BitDht::addKnownPeer() Warning! Non IPv4 Address - Cannot handle IPV6 Yet. addr.ss_family=" << addr.ss_family;
std::cerr << std::endl; std::cerr << std::endl;
}
sockaddr_clear(&addrv4); sockaddr_clear(&addrv4);
if (flags & NETASSIST_KNOWN_PEER_ONLINE) if (flags & NETASSIST_KNOWN_PEER_ONLINE)

View File

@ -27,6 +27,8 @@
#include "groutermatrix.h" #include "groutermatrix.h"
#include "grouteritems.h" #include "grouteritems.h"
//#define ROUTING_MATRIX_DEBUG
GRouterMatrix::GRouterMatrix() GRouterMatrix::GRouterMatrix()
{ {
_proba_need_updating = true ; _proba_need_updating = true ;
@ -72,7 +74,9 @@ bool GRouterMatrix::addRoutingClue(const GRouterKeyId& key_id,const RsPeerId& so
for(uint32_t i=RS_GROUTER_MATRIX_MAX_HIT_ENTRIES;i<sz;++i) for(uint32_t i=RS_GROUTER_MATRIX_MAX_HIT_ENTRIES;i<sz;++i)
{ {
lst.pop_back() ; lst.pop_back() ;
#ifdef ROUTING_MATRIX_DEBUG
std::cerr << "Poped one entry" << std::endl; std::cerr << "Poped one entry" << std::endl;
#endif
} }
_proba_need_updating = true ; // always, since we added new clues. _proba_need_updating = true ; // always, since we added new clues.
@ -152,8 +156,10 @@ bool GRouterMatrix::computeRoutingProbabilities(const GRouterKeyId& key_id, cons
// Then for a given list of online friends, the weights are computed into probabilities, // Then for a given list of online friends, the weights are computed into probabilities,
// that always sum up to 1. // that always sum up to 1.
// //
#ifdef ROUTING_MATRIX_DEBUG
if(_proba_need_updating) if(_proba_need_updating)
std::cerr << "GRouterMatrix::computeRoutingProbabilities(): matrix is not up to date. Not a real problem, but still..." << std::endl; std::cerr << "GRouterMatrix::computeRoutingProbabilities(): matrix is not up to date. Not a real problem, but still..." << std::endl;
#endif
probas.resize(friends.size(),0.0f) ; probas.resize(friends.size(),0.0f) ;
float total = 0.0f ; float total = 0.0f ;
@ -169,7 +175,9 @@ bool GRouterMatrix::computeRoutingProbabilities(const GRouterKeyId& key_id, cons
probas.clear() ; probas.clear() ;
probas.resize(friends.size(),p) ; probas.resize(friends.size(),p) ;
#ifdef ROUTING_MATRIX_DEBUG
std::cerr << "GRouterMatrix::computeRoutingProbabilities(): key id " << key_id.toStdString() << " does not exist! Returning uniform probabilities." << std::endl; std::cerr << "GRouterMatrix::computeRoutingProbabilities(): key id " << key_id.toStdString() << " does not exist! Returning uniform probabilities." << std::endl;
#endif
return false ; return false ;
} }
const std::vector<float>& w(it2->second) ; const std::vector<float>& w(it2->second) ;
@ -203,7 +211,9 @@ bool GRouterMatrix::updateRoutingProbabilities()
for(std::map<GRouterKeyId, std::list<RoutingMatrixHitEntry> >::const_iterator it(_routing_clues.begin());it!=_routing_clues.end();++it) for(std::map<GRouterKeyId, std::list<RoutingMatrixHitEntry> >::const_iterator it(_routing_clues.begin());it!=_routing_clues.end();++it)
{ {
#ifdef ROUTING_MATRIX_DEBUG
std::cerr << " " << it->first.toStdString() << " : " ; std::cerr << " " << it->first.toStdString() << " : " ;
#endif
std::vector<float>& v(_time_combined_hits[it->first]) ; std::vector<float>& v(_time_combined_hits[it->first]) ;
v.clear() ; v.clear() ;
@ -217,7 +227,9 @@ bool GRouterMatrix::updateRoutingProbabilities()
v[(*it2).friend_id] += (*it2).weight / (time_difference_in_days*time_difference_in_days) ; v[(*it2).friend_id] += (*it2).weight / (time_difference_in_days*time_difference_in_days) ;
} }
} }
#ifdef ROUTING_MATRIX_DEBUG
std::cerr << " done." << std::endl; std::cerr << " done." << std::endl;
#endif
_proba_need_updating = false ; _proba_need_updating = false ;
return true ; return true ;
@ -225,7 +237,9 @@ bool GRouterMatrix::updateRoutingProbabilities()
bool GRouterMatrix::saveList(std::list<RsItem*>& items) bool GRouterMatrix::saveList(std::list<RsItem*>& items)
{ {
#ifdef ROUTING_MATRIX_DEBUG
std::cerr << " GRoutingMatrix::saveList()" << std::endl; std::cerr << " GRoutingMatrix::saveList()" << std::endl;
#endif
RsGRouterMatrixFriendListItem *item = new RsGRouterMatrixFriendListItem ; RsGRouterMatrixFriendListItem *item = new RsGRouterMatrixFriendListItem ;
@ -249,13 +263,17 @@ bool GRouterMatrix::loadList(std::list<RsItem*>& items)
RsGRouterMatrixFriendListItem *itm1 = NULL ; RsGRouterMatrixFriendListItem *itm1 = NULL ;
RsGRouterMatrixCluesItem *itm2 = NULL ; RsGRouterMatrixCluesItem *itm2 = NULL ;
#ifdef ROUTING_MATRIX_DEBUG
std::cerr << " GRoutingMatrix::loadList()" << std::endl; std::cerr << " GRoutingMatrix::loadList()" << std::endl;
#endif
for(std::list<RsItem*>::const_iterator it(items.begin());it!=items.end();++it) for(std::list<RsItem*>::const_iterator it(items.begin());it!=items.end();++it)
{ {
if(NULL != (itm2 = dynamic_cast<RsGRouterMatrixCluesItem*>(*it))) if(NULL != (itm2 = dynamic_cast<RsGRouterMatrixCluesItem*>(*it)))
{ {
#ifdef ROUTING_MATRIX_DEBUG
std::cerr << " initing routing clues." << std::endl; std::cerr << " initing routing clues." << std::endl;
#endif
_routing_clues[itm2->destination_key] = itm2->clues ; _routing_clues[itm2->destination_key] = itm2->clues ;
_proba_need_updating = true ; // notifies to re-compute all the info. _proba_need_updating = true ; // notifies to re-compute all the info.

View File

@ -428,10 +428,9 @@ bool p3ServiceControl::updateServicesProvided(const RsPeerId &peerId, const RsPe
#ifdef SERVICECONTROL_DEBUG #ifdef SERVICECONTROL_DEBUG
std::cerr << "p3ServiceControl::updateServicesProvided() from: " << peerId.toStdString(); std::cerr << "p3ServiceControl::updateServicesProvided() from: " << peerId.toStdString();
std::cerr << std::endl; std::cerr << std::endl;
#endif
std::cerr << info; std::cerr << info;
std::cerr << std::endl; std::cerr << std::endl;
#endif
mServicesProvided[peerId] = info; mServicesProvided[peerId] = info;
updateFilterByPeer_locked(peerId); updateFilterByPeer_locked(peerId);

View File

@ -42,6 +42,7 @@ const int pqipersongrpzone = 354;
#include "pqi/pqissllistener.h" #include "pqi/pqissllistener.h"
#include "pqi/p3peermgr.h" #include "pqi/p3peermgr.h"
//#define PQISSLPERSON_DEBUG
#ifndef PQI_DISABLE_UDP #ifndef PQI_DISABLE_UDP
#include "pqi/pqissludp.h" #include "pqi/pqissludp.h"
@ -57,8 +58,10 @@ pqilistener * pqisslpersongrp::locked_createListener(const struct sockaddr_stora
pqiperson * pqisslpersongrp::locked_createPerson(const RsPeerId& id, pqilistener *listener) pqiperson * pqisslpersongrp::locked_createPerson(const RsPeerId& id, pqilistener *listener)
{ {
#ifdef PQISSLPERSON_DEBUG
std::cerr << "pqisslpersongrp::locked_createPerson() PeerId: " << id; std::cerr << "pqisslpersongrp::locked_createPerson() PeerId: " << id;
std::cerr << std::endl; std::cerr << std::endl;
#endif
pqioutput(PQL_DEBUG_BASIC, pqipersongrpzone, "pqipersongrp::createPerson() PeerId: " + id.toStdString()); pqioutput(PQL_DEBUG_BASIC, pqipersongrpzone, "pqipersongrp::createPerson() PeerId: " + id.toStdString());
@ -68,8 +71,10 @@ pqiperson * pqisslpersongrp::locked_createPerson(const RsPeerId& id, pqilistener
// If we are a hidden node - then all connections should be via proxy. // If we are a hidden node - then all connections should be via proxy.
if (mPeerMgr->isHiddenPeer(id) || mPeerMgr->isHidden()) if (mPeerMgr->isHiddenPeer(id) || mPeerMgr->isHidden())
{ {
#ifdef PQISTREAMER_DEBUG
std::cerr << "pqisslpersongrp::locked_createPerson() Is Hidden Peer!"; std::cerr << "pqisslpersongrp::locked_createPerson() Is Hidden Peer!";
std::cerr << std::endl; std::cerr << std::endl;
#endif
pqisslproxy *pqis = new pqisslproxy((pqissllistener *) listener, pqip, mLinkMgr); pqisslproxy *pqis = new pqisslproxy((pqissllistener *) listener, pqip, mLinkMgr);
@ -90,8 +95,10 @@ pqiperson * pqisslpersongrp::locked_createPerson(const RsPeerId& id, pqilistener
} }
else else
{ {
#ifdef PQISTREAMER_DEBUG
std::cerr << "pqisslpersongrp::locked_createPerson() Is Normal Peer!"; std::cerr << "pqisslpersongrp::locked_createPerson() Is Normal Peer!";
std::cerr << std::endl; std::cerr << std::endl;
#endif
pqissl *pqis = new pqissl((pqissllistener *) listener, pqip, mLinkMgr); pqissl *pqis = new pqissl((pqissllistener *) listener, pqip, mLinkMgr);

View File

@ -31,6 +31,8 @@
#define DEFAULT_STREAMER_SLEEP 1000 // 1 ms. #define DEFAULT_STREAMER_SLEEP 1000 // 1 ms.
#define DEFAULT_STREAMER_IDLE_SLEEP 1000000 // 1 sec #define DEFAULT_STREAMER_IDLE_SLEEP 1000000 // 1 sec
//#define PQISTREAMER_DEBUG
pqithreadstreamer::pqithreadstreamer(PQInterface *parent, RsSerialiser *rss, const RsPeerId& id, BinInterface *bio_in, int bio_flags_in) pqithreadstreamer::pqithreadstreamer(PQInterface *parent, RsSerialiser *rss, const RsPeerId& id, BinInterface *bio_in, int bio_flags_in)
:pqistreamer(rss, id, bio_in, bio_flags_in), mParent(parent), mThreadMutex("pqithreadstreamer"), mTimeout(0) :pqistreamer(rss, id, bio_in, bio_flags_in), mParent(parent), mThreadMutex("pqithreadstreamer"), mTimeout(0)
{ {
@ -58,9 +60,11 @@ void pqithreadstreamer::start()
{ {
// mToRun = true; // mToRun = true;
#ifdef PQISTREAMER_DEBUG
std::cerr << "pqithreadstreamer::run()" << std::endl; std::cerr << "pqithreadstreamer::run()" << std::endl;
std::cerr << " initing should_stop=0" << std::endl; std::cerr << " initing should_stop=0" << std::endl;
std::cerr << " initing has_stopped=1" << std::endl; std::cerr << " initing has_stopped=1" << std::endl;
#endif
sem_init(&mShouldStopSemaphore,0,0) ; sem_init(&mShouldStopSemaphore,0,0) ;
sem_init(&mHasStoppedSemaphore,0,0) ; sem_init(&mHasStoppedSemaphore,0,0) ;
@ -70,8 +74,10 @@ void pqithreadstreamer::start()
void pqithreadstreamer::run() void pqithreadstreamer::run()
{ {
#ifdef PQISTREAMER_DEBUG
std::cerr << "pqithreadstream::run()"; std::cerr << "pqithreadstream::run()";
std::cerr << std::endl; std::cerr << std::endl;
#endif
// tell the OS to free the thread resources when this function exits // tell the OS to free the thread resources when this function exits
// it is a replacement for pthread_join() // it is a replacement for pthread_join()
@ -84,8 +90,10 @@ void pqithreadstreamer::run()
if(sval > 0) if(sval > 0)
{ {
#ifdef PQISTREAMER_DEBUG
std::cerr << "pqithreadstreamer::run(): asked to stop." << std::endl; std::cerr << "pqithreadstreamer::run(): asked to stop." << std::endl;
std::cerr << " setting hasStopped=1" << std::endl; std::cerr << " setting hasStopped=1" << std::endl;
#endif
sem_post(&mHasStoppedSemaphore) ; sem_post(&mHasStoppedSemaphore) ;
return ; return ;
} }
@ -96,18 +104,24 @@ void pqithreadstreamer::run()
void pqithreadstreamer::shutdown() void pqithreadstreamer::shutdown()
{ {
#ifdef PQISTREAMER_DEBUG
std::cerr << "pqithreadstreamer::stop()" << std::endl; std::cerr << "pqithreadstreamer::stop()" << std::endl;
#endif
int sval =0; int sval =0;
sem_getvalue(&mHasStoppedSemaphore,&sval) ; sem_getvalue(&mHasStoppedSemaphore,&sval) ;
if(sval > 0) if(sval > 0)
{ {
#ifdef PQISTREAMER_DEBUG
std::cerr << " thread not running. Quit." << std::endl; std::cerr << " thread not running. Quit." << std::endl;
#endif
return ; return ;
} }
#ifdef PQISTREAMER_DEBUG
std::cerr << " calling stop" << std::endl; std::cerr << " calling stop" << std::endl;
#endif
sem_post(&mShouldStopSemaphore) ; sem_post(&mShouldStopSemaphore) ;
} }
@ -115,9 +129,13 @@ void pqithreadstreamer::fullstop()
{ {
shutdown() ; shutdown() ;
#ifdef PQISTREAMER_DEBUG
std::cerr << " waiting stop" << std::endl; std::cerr << " waiting stop" << std::endl;
#endif
sem_wait(&mHasStoppedSemaphore) ; sem_wait(&mHasStoppedSemaphore) ;
#ifdef PQISTREAMER_DEBUG
std::cerr << " finished!" << std::endl; std::cerr << " finished!" << std::endl;
#endif
} }
int pqithreadstreamer::data_tick() int pqithreadstreamer::data_tick()

View File

@ -247,7 +247,7 @@ RsPeerId ChatId::toPeerId() const
return peer_id; return peer_id;
else else
{ {
std::cerr << "ChatId Warning: conversation to RsPeerId requested, but type is different." << std::endl; std::cerr << "ChatId Warning: conversation to RsPeerId requested, but type is different. Current value=\"" << toStdString() << "\"" << std::endl;
return RsPeerId(); return RsPeerId();
} }
} }
@ -257,7 +257,7 @@ RsGxsId ChatId::toGxsId() const
return gxs_id; return gxs_id;
else else
{ {
std::cerr << "ChatId Warning: conversation to RsGxsId requested, but type is different." << std::endl; std::cerr << "ChatId Warning: conversation to RsGxsId requested, but type is different. Current value=\"" << toStdString() << "\"" << std::endl;
return RsGxsId(); return RsGxsId();
} }
} }
@ -267,7 +267,7 @@ ChatLobbyId ChatId::toLobbyId() const
return lobby_id; return lobby_id;
else else
{ {
std::cerr << "ChatId Warning: conversation to ChatLobbyId requested, but type is different." << std::endl; std::cerr << "ChatId Warning: conversation to ChatLobbyId requested, but type is different. Current value=\"" << toStdString() << "\"" << std::endl;
return 0; return 0;
} }
} }

View File

@ -77,11 +77,13 @@ bool RsTlvGenericPairRef<K, V>::SetTlv(void *data, uint32_t size, uint32_t *off
std::cerr << "RsTlvGenericPairRef<>::SetTlv() Failed"; std::cerr << "RsTlvGenericPairRef<>::SetTlv() Failed";
std::cerr << std::endl; std::cerr << std::endl;
} }
#ifdef TLV_GENERICMAP_DEBUG
else else
{ {
std::cerr << "RsTlvGenericPairRef<>::SetTlv() Ok"; std::cerr << "RsTlvGenericPairRef<>::SetTlv() Ok";
std::cerr << std::endl; std::cerr << std::endl;
} }
#endif
return ok; return ok;
} }

View File

@ -1049,18 +1049,18 @@ void p3discovery2::recvPGPCertificate(const SSLID &fromId, RsDiscPgpCertItem *it
/************* from pqiServiceMonitor *******************/ /************* from pqiServiceMonitor *******************/
void p3discovery2::statusChange(const std::list<pqiServicePeer> &plist) void p3discovery2::statusChange(const std::list<pqiServicePeer> &plist)
{ {
//#ifdef P3DISC_DEBUG #ifdef P3DISC_DEBUG
std::cerr << "p3discovery2::statusChange()" << std::endl; std::cerr << "p3discovery2::statusChange()" << std::endl;
//#endif #endif
std::list<pqiServicePeer>::const_iterator pit; std::list<pqiServicePeer>::const_iterator pit;
for(pit = plist.begin(); pit != plist.end(); ++pit) for(pit = plist.begin(); pit != plist.end(); ++pit)
{ {
if (pit->actions & RS_SERVICE_PEER_CONNECTED) if (pit->actions & RS_SERVICE_PEER_CONNECTED)
{ {
//#ifdef P3DISC_DEBUG #ifdef P3DISC_DEBUG
std::cerr << "p3discovery2::statusChange() Starting Disc with: " << pit->id << std::endl; std::cerr << "p3discovery2::statusChange() Starting Disc with: " << pit->id << std::endl;
//#endif #endif
sendOwnContactInfo(pit->id); sendOwnContactInfo(pit->id);
} }
else if (pit->actions & RS_SERVICE_PEER_DISCONNECTED) else if (pit->actions & RS_SERVICE_PEER_DISCONNECTED)
@ -1070,22 +1070,22 @@ void p3discovery2::statusChange(const std::list<pqiServicePeer> &plist)
if (pit->actions & RS_SERVICE_PEER_NEW) if (pit->actions & RS_SERVICE_PEER_NEW)
{ {
//#ifdef P3DISC_DEBUG #ifdef P3DISC_DEBUG
std::cerr << "p3discovery2::statusChange() Adding Friend: " << pit->id << std::endl; std::cerr << "p3discovery2::statusChange() Adding Friend: " << pit->id << std::endl;
//#endif #endif
addFriend(pit->id); addFriend(pit->id);
} }
else if (pit->actions & RS_SERVICE_PEER_REMOVED) else if (pit->actions & RS_SERVICE_PEER_REMOVED)
{ {
//#ifdef P3DISC_DEBUG #ifdef P3DISC_DEBUG
std::cerr << "p3discovery2::statusChange() Removing Friend: " << pit->id << std::endl; std::cerr << "p3discovery2::statusChange() Removing Friend: " << pit->id << std::endl;
//#endif #endif
removeFriend(pit->id); removeFriend(pit->id);
} }
} }
//#ifdef P3DISC_DEBUG #ifdef P3DISC_DEBUG
std::cerr << "p3discovery2::statusChange() finished." << std::endl; std::cerr << "p3discovery2::statusChange() finished." << std::endl;
//#endif #endif
return; return;
} }

View File

@ -1046,7 +1046,8 @@ bool p3IdService::getGroupData(const uint32_t &token, std::vector<RsGxsIdGroup>
group.mPgpKnown = false; group.mPgpKnown = false;
group.mPgpId.clear(); group.mPgpId.clear();
std::cerr << "p3IdService::getGroupData() Failed to decode ServiceString"; std::cerr << "p3IdService::getGroupData() Failed to decode ServiceString \""
<< group.mMeta.mServiceString << "\"" ;
std::cerr << std::endl; std::cerr << std::endl;
} }

View File

@ -325,14 +325,18 @@ void p3PostBase::background_requestUnprocessedGroup()
RsStackMutex stack(mPostBaseMtx); /********** STACK LOCKED MTX ******/ RsStackMutex stack(mPostBaseMtx); /********** STACK LOCKED MTX ******/
if (mBgProcessing) if (mBgProcessing)
{ {
#ifdef POSTBASE_DEBUG
std::cerr << "p3PostBase::background_requestUnprocessedGroup() Already Active"; std::cerr << "p3PostBase::background_requestUnprocessedGroup() Already Active";
std::cerr << std::endl; std::cerr << std::endl;
#endif
return; return;
} }
if (mBgGroupList.empty()) if (mBgGroupList.empty())
{ {
#ifdef POSTBASE_DEBUG
std::cerr << "p3PostBase::background_requestUnprocessedGroup() No Groups to Process"; std::cerr << "p3PostBase::background_requestUnprocessedGroup() No Groups to Process";
std::cerr << std::endl; std::cerr << std::endl;
#endif
return; return;
} }

View File

@ -148,8 +148,10 @@ bool p3ServiceInfo::recvServiceInfoList(RsServiceInfoListItem *item)
{ {
RsPeerId peerId = item->PeerId(); RsPeerId peerId = item->PeerId();
#ifdef DEBUG_INFO
std::cerr << "p3ServiceInfo::recvServiceInfoList() from: " << peerId.toStdString(); std::cerr << "p3ServiceInfo::recvServiceInfoList() from: " << peerId.toStdString();
std::cerr << std::endl; std::cerr << std::endl;
#endif
RsPeerServiceInfo info; RsPeerServiceInfo info;
if (convertServiceItemToInfo(item, info)) if (convertServiceItemToInfo(item, info))
@ -195,8 +197,10 @@ bool p3ServiceInfo::sendPackets()
int p3ServiceInfo::sendServiceInfoList(const RsPeerId &peerId) int p3ServiceInfo::sendServiceInfoList(const RsPeerId &peerId)
{ {
#ifdef DEBUG_INFO
std::cerr << "p3ServiceInfo::sendServiceInfoList() to " << peerId.toStdString(); std::cerr << "p3ServiceInfo::sendServiceInfoList() to " << peerId.toStdString();
std::cerr << std::endl; std::cerr << std::endl;
#endif
RsServiceInfoListItem *item = new RsServiceInfoListItem(); RsServiceInfoListItem *item = new RsServiceInfoListItem();
@ -204,10 +208,12 @@ int p3ServiceInfo::sendServiceInfoList(const RsPeerId &peerId)
bool sent = false; bool sent = false;
if (mServiceControl->getServicesAllowed(peerId, info)) if (mServiceControl->getServicesAllowed(peerId, info))
{ {
#ifdef DEBUG_INFO
std::cerr << "p3ServiceInfo::sendServiceInfoList() Info: "; std::cerr << "p3ServiceInfo::sendServiceInfoList() Info: ";
std::cerr << std::endl; std::cerr << std::endl;
std::cerr << info; std::cerr << info;
std::cerr << std::endl; std::cerr << std::endl;
#endif
if (convertServiceInfoToItem(info, item)) if (convertServiceInfoToItem(info, item))
{ {
@ -228,8 +234,10 @@ int p3ServiceInfo::sendServiceInfoList(const RsPeerId &peerId)
void p3ServiceInfo::statusChange(const std::list<pqipeer> &plist) void p3ServiceInfo::statusChange(const std::list<pqipeer> &plist)
{ {
#ifdef DEBUG_INFO
std::cerr << "p3ServiceInfo::statusChange()"; std::cerr << "p3ServiceInfo::statusChange()";
std::cerr << std::endl; std::cerr << std::endl;
#endif
std::list<pqipeer>::const_iterator it; std::list<pqipeer>::const_iterator it;
for (it = plist.begin(); it != plist.end(); ++it) for (it = plist.begin(); it != plist.end(); ++it)
@ -238,10 +246,12 @@ void p3ServiceInfo::statusChange(const std::list<pqipeer> &plist)
{ {
if (it->actions & RS_PEER_CONNECTED) if (it->actions & RS_PEER_CONNECTED)
{ {
#ifdef DEBUG_INFO
std::cerr << "p3ServiceInfo::statusChange()"; std::cerr << "p3ServiceInfo::statusChange()";
std::cerr << "Peer: " << it->id; std::cerr << "Peer: " << it->id;
std::cerr << " Connected"; std::cerr << " Connected";
std::cerr << std::endl; std::cerr << std::endl;
#endif
RsStackMutex stack(mInfoMtx); /****** LOCKED MUTEX *******/ RsStackMutex stack(mInfoMtx); /****** LOCKED MUTEX *******/
mPeersToUpdate.insert(it->id); mPeersToUpdate.insert(it->id);

View File

@ -195,8 +195,10 @@ uint16_t sockaddr_storage_port(const struct sockaddr_storage &addr)
return sockaddr_storage_ipv6_port(addr); return sockaddr_storage_ipv6_port(addr);
break; break;
default: default:
std::cerr << "sockaddr_storage_port() invalid addr.ss_family"; #ifdef SS_DEBUG
std::cerr << "sockaddr_storage_port() invalid addr.ss_family: " << addr.ss_family;
std::cerr << std::endl; std::cerr << std::endl;
#endif
break; break;
} }
return 0; return 0;
@ -695,8 +697,10 @@ bool sockaddr_storage_ipv4_setport(struct sockaddr_storage &addr, uint16_t port)
bool sockaddr_storage_ipv6_zeroip(struct sockaddr_storage &addr) bool sockaddr_storage_ipv6_zeroip(struct sockaddr_storage &addr)
{ {
#ifdef SS_DEBUG
std::cerr << "sockaddr_storage_ipv6_zeroip()"; std::cerr << "sockaddr_storage_ipv6_zeroip()";
std::cerr << std::endl; std::cerr << std::endl;
#endif
struct sockaddr_in6 *ipv6_ptr = to_ipv6_ptr(addr); struct sockaddr_in6 *ipv6_ptr = to_ipv6_ptr(addr);
memset(&(ipv6_ptr->sin6_addr), 0, sizeof(ipv6_ptr->sin6_addr)); memset(&(ipv6_ptr->sin6_addr), 0, sizeof(ipv6_ptr->sin6_addr));
@ -705,8 +709,10 @@ bool sockaddr_storage_ipv6_zeroip(struct sockaddr_storage &addr)
bool sockaddr_storage_ipv6_copyip(struct sockaddr_storage &dst, const struct sockaddr_storage &src) bool sockaddr_storage_ipv6_copyip(struct sockaddr_storage &dst, const struct sockaddr_storage &src)
{ {
#ifdef SS_DEBUG
std::cerr << "sockaddr_storage_ipv6_copyip()"; std::cerr << "sockaddr_storage_ipv6_copyip()";
std::cerr << std::endl; std::cerr << std::endl;
#endif
struct sockaddr_in6 *dst_ptr = to_ipv6_ptr(dst); struct sockaddr_in6 *dst_ptr = to_ipv6_ptr(dst);
const struct sockaddr_in6 *src_ptr = to_const_ipv6_ptr(src); const struct sockaddr_in6 *src_ptr = to_const_ipv6_ptr(src);
@ -718,8 +724,10 @@ bool sockaddr_storage_ipv6_copyip(struct sockaddr_storage &dst, const struct soc
uint16_t sockaddr_storage_ipv6_port(const struct sockaddr_storage &addr) uint16_t sockaddr_storage_ipv6_port(const struct sockaddr_storage &addr)
{ {
#ifdef SS_DEBUG
std::cerr << "sockaddr_storage_ipv6_port()"; std::cerr << "sockaddr_storage_ipv6_port()";
std::cerr << std::endl; std::cerr << std::endl;
#endif
const struct sockaddr_in6 *ipv6_ptr = to_const_ipv6_ptr(addr); const struct sockaddr_in6 *ipv6_ptr = to_const_ipv6_ptr(addr);
uint16_t port = ntohs(ipv6_ptr->sin6_port); uint16_t port = ntohs(ipv6_ptr->sin6_port);
@ -728,8 +736,10 @@ uint16_t sockaddr_storage_ipv6_port(const struct sockaddr_storage &addr)
bool sockaddr_storage_ipv6_setport(struct sockaddr_storage &addr, uint16_t port) bool sockaddr_storage_ipv6_setport(struct sockaddr_storage &addr, uint16_t port)
{ {
#ifdef SS_DEBUG
std::cerr << "sockaddr_storage_ipv6_setport()"; std::cerr << "sockaddr_storage_ipv6_setport()";
std::cerr << std::endl; std::cerr << std::endl;
#endif
struct sockaddr_in6 *ipv6_ptr = to_ipv6_ptr(addr); struct sockaddr_in6 *ipv6_ptr = to_ipv6_ptr(addr);
ipv6_ptr->sin6_port = htons(port); ipv6_ptr->sin6_port = htons(port);
@ -818,8 +828,10 @@ bool sockaddr_storage_ipv4_samesubnet(const struct sockaddr_storage &addr, const
// IPV6 // IPV6
bool sockaddr_storage_ipv6_lessthan(const struct sockaddr_storage &addr, const struct sockaddr_storage &addr2) bool sockaddr_storage_ipv6_lessthan(const struct sockaddr_storage &addr, const struct sockaddr_storage &addr2)
{ {
#ifdef SS_DEBUG
std::cerr << "sockaddr_storage_ipv6_lessthan()"; std::cerr << "sockaddr_storage_ipv6_lessthan()";
std::cerr << std::endl; std::cerr << std::endl;
#endif
const struct sockaddr_in6 *ptr1 = to_const_ipv6_ptr(addr); const struct sockaddr_in6 *ptr1 = to_const_ipv6_ptr(addr);
const struct sockaddr_in6 *ptr2 = to_const_ipv6_ptr(addr2); const struct sockaddr_in6 *ptr2 = to_const_ipv6_ptr(addr2);
@ -841,8 +853,10 @@ bool sockaddr_storage_ipv6_lessthan(const struct sockaddr_storage &addr, const s
bool sockaddr_storage_ipv6_same(const struct sockaddr_storage &addr, const struct sockaddr_storage &addr2) bool sockaddr_storage_ipv6_same(const struct sockaddr_storage &addr, const struct sockaddr_storage &addr2)
{ {
#ifdef SS_DEBUG
std::cerr << "sockaddr_storage_ipv6_same()"; std::cerr << "sockaddr_storage_ipv6_same()";
std::cerr << std::endl; std::cerr << std::endl;
#endif
const struct sockaddr_in6 *ptr1 = to_const_ipv6_ptr(addr); const struct sockaddr_in6 *ptr1 = to_const_ipv6_ptr(addr);
const struct sockaddr_in6 *ptr2 = to_const_ipv6_ptr(addr2); const struct sockaddr_in6 *ptr2 = to_const_ipv6_ptr(addr2);
@ -851,8 +865,10 @@ bool sockaddr_storage_ipv6_same(const struct sockaddr_storage &addr, const struc
bool sockaddr_storage_ipv6_sameip(const struct sockaddr_storage &addr, const struct sockaddr_storage &addr2) bool sockaddr_storage_ipv6_sameip(const struct sockaddr_storage &addr, const struct sockaddr_storage &addr2)
{ {
#ifdef SS_DEBUG
std::cerr << "sockaddr_storage_ipv6_sameip()"; std::cerr << "sockaddr_storage_ipv6_sameip()";
std::cerr << std::endl; std::cerr << std::endl;
#endif
const struct sockaddr_in6 *ptr1 = to_const_ipv6_ptr(addr); const struct sockaddr_in6 *ptr1 = to_const_ipv6_ptr(addr);
const struct sockaddr_in6 *ptr2 = to_const_ipv6_ptr(addr2); const struct sockaddr_in6 *ptr2 = to_const_ipv6_ptr(addr2);
@ -876,8 +892,10 @@ bool sockaddr_storage_ipv6_samenet(const struct sockaddr_storage &addr, const st
(void) addr; (void) addr;
(void) addr2; (void) addr2;
#ifdef SS_DEBUG
std::cerr << "sockaddr_storage_ipv6_samenet() TODO"; std::cerr << "sockaddr_storage_ipv6_samenet() TODO";
std::cerr << std::endl; std::cerr << std::endl;
#endif
return false; return false;
} }
@ -887,8 +905,10 @@ bool sockaddr_storage_ipv6_samesubnet(const struct sockaddr_storage &addr, const
(void) addr; (void) addr;
(void) addr2; (void) addr2;
#ifdef SS_DEBUG
std::cerr << "sockaddr_storage_ipv6_samesubnet() TODO"; std::cerr << "sockaddr_storage_ipv6_samesubnet() TODO";
std::cerr << std::endl; std::cerr << std::endl;
#endif
return false; return false;
} }
@ -1000,40 +1020,50 @@ bool sockaddr_storage_ipv4_isExternalNet(const struct sockaddr_storage &addr)
bool sockaddr_storage_ipv6_isnull(const struct sockaddr_storage &addr) bool sockaddr_storage_ipv6_isnull(const struct sockaddr_storage &addr)
{ {
#ifdef SS_DEBUG
std::cerr << "sockaddr_storage_ipv6_isnull() TODO"; std::cerr << "sockaddr_storage_ipv6_isnull() TODO";
std::cerr << std::endl; std::cerr << std::endl;
#endif
return false; return false;
} }
bool sockaddr_storage_ipv6_isValidNet(const struct sockaddr_storage &addr) bool sockaddr_storage_ipv6_isValidNet(const struct sockaddr_storage &addr)
{ {
#ifdef SS_DEBUG
std::cerr << "sockaddr_storage_ipv6_isValidNet() TODO"; std::cerr << "sockaddr_storage_ipv6_isValidNet() TODO";
std::cerr << std::endl; std::cerr << std::endl;
#endif
return false; return false;
} }
bool sockaddr_storage_ipv6_isLoopbackNet(const struct sockaddr_storage &addr) bool sockaddr_storage_ipv6_isLoopbackNet(const struct sockaddr_storage &addr)
{ {
#ifdef SS_DEBUG
std::cerr << "sockaddr_storage_ipv6_isLoopbackNet() TODO"; std::cerr << "sockaddr_storage_ipv6_isLoopbackNet() TODO";
std::cerr << std::endl; std::cerr << std::endl;
#endif
return false; return false;
} }
bool sockaddr_storage_ipv6_isPrivateNet(const struct sockaddr_storage &addr) bool sockaddr_storage_ipv6_isPrivateNet(const struct sockaddr_storage &addr)
{ {
#ifdef SS_DEBUG
std::cerr << "sockaddr_storage_ipv6_isPrivateNet() TODO"; std::cerr << "sockaddr_storage_ipv6_isPrivateNet() TODO";
std::cerr << std::endl; std::cerr << std::endl;
#endif
return false; return false;
} }
bool sockaddr_storage_ipv6_isExternalNet(const struct sockaddr_storage &addr) bool sockaddr_storage_ipv6_isExternalNet(const struct sockaddr_storage &addr)
{ {
#ifdef SS_DEBUG
std::cerr << "sockaddr_storage_ipv6_isExternalNet() TODO"; std::cerr << "sockaddr_storage_ipv6_isExternalNet() TODO";
std::cerr << std::endl; std::cerr << std::endl;
#endif
return false; return false;
} }

View File

@ -843,8 +843,6 @@ void MessagesDialog::insertMessages()
return; return;
} }
std::cerr <<"MessagesDialog::insertMessages called";
std::list<MsgInfoSummary> msgList; std::list<MsgInfoSummary> msgList;
std::list<MsgInfoSummary>::const_iterator it; std::list<MsgInfoSummary>::const_iterator it;
MessageInfo msgInfo; MessageInfo msgInfo;

View File

@ -1859,8 +1859,10 @@ void GxsForumThreadWidget::requestMsgData_ReplyMessage(const RsGxsGrpMsgIdPair &
RsTokReqOptions opts; RsTokReqOptions opts;
opts.mReqType = GXS_REQUEST_TYPE_MSG_DATA; opts.mReqType = GXS_REQUEST_TYPE_MSG_DATA;
#ifdef DEBUG_FORUMS
std::cerr << "GxsForumThreadWidget::requestMsgData_ReplyMessage(" << msgId.first << "," << msgId.second << ")"; std::cerr << "GxsForumThreadWidget::requestMsgData_ReplyMessage(" << msgId.first << "," << msgId.second << ")";
std::cerr << std::endl; std::cerr << std::endl;
#endif
GxsMsgReq msgIds; GxsMsgReq msgIds;
std::vector<RsGxsMessageId> &vect = msgIds[msgId.first]; std::vector<RsGxsMessageId> &vect = msgIds[msgId.first];
@ -1872,8 +1874,10 @@ void GxsForumThreadWidget::requestMsgData_ReplyMessage(const RsGxsGrpMsgIdPair &
void GxsForumThreadWidget::loadMsgData_ReplyMessage(const uint32_t &token) void GxsForumThreadWidget::loadMsgData_ReplyMessage(const uint32_t &token)
{ {
#ifdef DEBUG_FORUMS
std::cerr << "GxsForumThreadWidget::loadMsgData_ReplyMessage()"; std::cerr << "GxsForumThreadWidget::loadMsgData_ReplyMessage()";
std::cerr << std::endl; std::cerr << std::endl;
#endif
std::vector<RsGxsForumMsg> msgs; std::vector<RsGxsForumMsg> msgs;
if (rsGxsForums->getMsgData(token, msgs)) if (rsGxsForums->getMsgData(token, msgs))
@ -1899,8 +1903,10 @@ void GxsForumThreadWidget::loadMsgData_ReplyMessage(const uint32_t &token)
void GxsForumThreadWidget::loadRequest(const TokenQueue *queue, const TokenRequest &req) void GxsForumThreadWidget::loadRequest(const TokenQueue *queue, const TokenRequest &req)
{ {
#ifdef DEBUG_FORUMS
std::cerr << "GxsForumThreadWidget::loadRequest() UserType: " << req.mUserType; std::cerr << "GxsForumThreadWidget::loadRequest() UserType: " << req.mUserType;
std::cerr << std::endl; std::cerr << std::endl;
#endif
if (queue == mTokenQueue) if (queue == mTokenQueue)
{ {

View File

@ -87,9 +87,11 @@ bool TokenQueue::requestMsgInfo(uint32_t &token, uint32_t anstype, const RsTokRe
void TokenQueue::queueRequest(uint32_t token, uint32_t basictype, uint32_t anstype, uint32_t usertype) void TokenQueue::queueRequest(uint32_t token, uint32_t basictype, uint32_t anstype, uint32_t usertype)
{ {
#ifdef ID_DEBUG
std::cerr << "TokenQueue::queueRequest() Token: " << token << " Type: " << basictype; std::cerr << "TokenQueue::queueRequest() Token: " << token << " Type: " << basictype;
std::cerr << " AnsType: " << anstype << " UserType: " << usertype; std::cerr << " AnsType: " << anstype << " UserType: " << usertype;
std::cerr << std::endl; std::cerr << std::endl;
#endif
TokenRequest req; TokenRequest req;
req.mToken = token; req.mToken = token;
@ -210,10 +212,12 @@ void TokenQueue::cancelActiveRequestTokens(const uint32_t& userType)
void TokenQueue::loadRequest(const TokenRequest &req) void TokenQueue::loadRequest(const TokenRequest &req)
{ {
#ifdef DEBUG_INFO
std::cerr << "TokenQueue::loadRequest(): "; std::cerr << "TokenQueue::loadRequest(): ";
std::cerr << "Token: " << req.mToken << " Type: " << req.mType; std::cerr << "Token: " << req.mToken << " Type: " << req.mType;
std::cerr << " AnsType: " << req.mAnsType << " UserType: " << req.mUserType; std::cerr << " AnsType: " << req.mAnsType << " UserType: " << req.mUserType;
std::cerr << std::endl; std::cerr << std::endl;
#endif
mResponder->loadRequest(this, req); mResponder->loadRequest(this, req);
} }
@ -231,8 +235,10 @@ bool TokenQueue::cancelRequest(const uint32_t token)
{ {
mRequests.erase(it); mRequests.erase(it);
#ifdef DEBUG_INFO
std::cerr << "TokenQueue::cancelRequest() Cleared Request: " << token; std::cerr << "TokenQueue::cancelRequest() Cleared Request: " << token;
std::cerr << std::endl; std::cerr << std::endl;
#endif
return true; return true;
} }