further log cleanings

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2234 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2010-02-07 23:01:18 +00:00
parent ecea917822
commit a433eb6abd
2 changed files with 37 additions and 63 deletions

View File

@ -162,8 +162,7 @@ p3Peers::p3Peers(p3ConnectMgr *cm)
bool p3Peers::FriendsChanged() bool p3Peers::FriendsChanged()
{ {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::FriendsChanged()"; std::cerr << "p3Peers::FriendsChanged()" << std::endl;
std::cerr << std::endl;
#endif #endif
/* TODO */ /* TODO */
@ -173,8 +172,7 @@ bool p3Peers::FriendsChanged()
bool p3Peers::OthersChanged() bool p3Peers::OthersChanged()
{ {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::OthersChanged()"; std::cerr << "p3Peers::OthersChanged()" << std::endl;
std::cerr << std::endl;
#endif #endif
/* TODO */ /* TODO */
@ -185,8 +183,7 @@ bool p3Peers::OthersChanged()
std::string p3Peers::getOwnId() std::string p3Peers::getOwnId()
{ {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::getOwnId()"; std::cerr << "p3Peers::getOwnId()" << std::endl;
std::cerr << std::endl;
#endif #endif
return AuthSSL::getAuthSSL()->OwnId(); return AuthSSL::getAuthSSL()->OwnId();
@ -195,8 +192,7 @@ std::string p3Peers::getOwnId()
bool p3Peers::getOnlineList(std::list<std::string> &ids) bool p3Peers::getOnlineList(std::list<std::string> &ids)
{ {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::getOnlineList()"; std::cerr << "p3Peers::getOnlineList()" << std::endl;
std::cerr << std::endl;
#endif #endif
/* get from mConnectMgr */ /* get from mConnectMgr */
@ -207,8 +203,7 @@ bool p3Peers::getOnlineList(std::list<std::string> &ids)
bool p3Peers::getFriendList(std::list<std::string> &ids) bool p3Peers::getFriendList(std::list<std::string> &ids)
{ {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::getFriendList()"; std::cerr << "p3Peers::getFriendList()" << std::endl;
std::cerr << std::endl;
#endif #endif
/* get from mConnectMgr */ /* get from mConnectMgr */
@ -231,8 +226,7 @@ bool p3Peers::getFriendList(std::list<std::string> &ids)
bool p3Peers::isOnline(std::string id) bool p3Peers::isOnline(std::string id)
{ {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::isOnline() " << id; std::cerr << "p3Peers::isOnline() " << id << std::endl;
std::cerr << std::endl;
#endif #endif
/* get from mConnectMgr */ /* get from mConnectMgr */
@ -248,8 +242,7 @@ bool p3Peers::isOnline(std::string id)
bool p3Peers::isFriend(std::string ssl_id) bool p3Peers::isFriend(std::string ssl_id)
{ {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::isFriend() " << ssl_id; std::cerr << "p3Peers::isFriend() " << ssl_id << std::endl;
std::cerr << std::endl;
#endif #endif
/* get from mConnectMgr */ /* get from mConnectMgr */
@ -442,8 +435,7 @@ bool p3Peers::isGPGAccepted(std::string gpg_id_is_friend)
std::string p3Peers::getPeerName(std::string ssl_or_gpg_id) std::string p3Peers::getPeerName(std::string ssl_or_gpg_id)
{ {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::getPeerName() " << ssl_or_gpg_id; std::cerr << "p3Peers::getPeerName() " << ssl_or_gpg_id << std::endl;
std::cerr << std::endl;
#endif #endif
std::string name; std::string name;
if (ssl_or_gpg_id == AuthSSL::getAuthSSL()->OwnId()) { if (ssl_or_gpg_id == AuthSSL::getAuthSSL()->OwnId()) {
@ -452,8 +444,7 @@ std::string p3Peers::getPeerName(std::string ssl_or_gpg_id)
peerConnectState pcs; peerConnectState pcs;
if (mConnMgr->getFriendNetStatus(ssl_or_gpg_id, pcs)) { if (mConnMgr->getFriendNetStatus(ssl_or_gpg_id, pcs)) {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::getPeerName() got a ssl id. Name is : " << pcs.name; std::cerr << "p3Peers::getPeerName() got a ssl id. Name is : " << pcs.name << std::endl;
std::cerr << std::endl;
#endif #endif
return pcs.name; return pcs.name;
} }
@ -464,8 +455,7 @@ std::string p3Peers::getPeerName(std::string ssl_or_gpg_id)
bool p3Peers::getGPGAllList(std::list<std::string> &ids) bool p3Peers::getGPGAllList(std::list<std::string> &ids)
{ {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::getGPGAllList()"; std::cerr << "p3Peers::getGPGAllList()" << std::endl;
std::cerr << std::endl;
#endif #endif
/* get from mAuthMgr */ /* get from mAuthMgr */
@ -476,8 +466,7 @@ bool p3Peers::getGPGAllList(std::list<std::string> &ids)
bool p3Peers::getGPGValidList(std::list<std::string> &ids) bool p3Peers::getGPGValidList(std::list<std::string> &ids)
{ {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::getPGPOthersList()"; std::cerr << "p3Peers::getPGPOthersList()" << std::endl;
std::cerr << std::endl;
#endif #endif
/* get from mAuthMgr */ /* get from mAuthMgr */
@ -488,8 +477,7 @@ bool p3Peers::getGPGValidList(std::list<std::string> &ids)
bool p3Peers::getGPGSignedList(std::list<std::string> &ids) bool p3Peers::getGPGSignedList(std::list<std::string> &ids)
{ {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::getPGPOthersList()"; std::cerr << "p3Peers::getPGPOthersList()" << std::endl;
std::cerr << std::endl;
#endif #endif
/* get from mAuthMgr */ /* get from mAuthMgr */
@ -500,8 +488,7 @@ bool p3Peers::getGPGSignedList(std::list<std::string> &ids)
bool p3Peers::getGPGAcceptedList(std::list<std::string> &ids) bool p3Peers::getGPGAcceptedList(std::list<std::string> &ids)
{ {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::getPGPOthersList()"; std::cerr << "p3Peers::getPGPOthersList()" << std::endl;
std::cerr << std::endl;
#endif #endif
//TODO implement an additional list of GPG keys that are accepted even if not signed //TODO implement an additional list of GPG keys that are accepted even if not signed
@ -512,8 +499,7 @@ bool p3Peers::getGPGAcceptedList(std::list<std::string> &ids)
bool p3Peers::getSSLChildListOfGPGId(std::string gpg_id, std::list<std::string> &ids) bool p3Peers::getSSLChildListOfGPGId(std::string gpg_id, std::list<std::string> &ids)
{ {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::getSSLChildListOfGPGId() for id : " << gpg_id; std::cerr << "p3Peers::getSSLChildListOfGPGId() for id : " << gpg_id << std::endl;
std::cerr << std::endl;
#endif #endif
ids.clear(); ids.clear();
if (gpg_id == "" ) { if (gpg_id == "" ) {
@ -525,13 +511,11 @@ bool p3Peers::getSSLChildListOfGPGId(std::string gpg_id, std::list<std::string>
peerConnectState pcs; peerConnectState pcs;
for (std::list<std::string>::iterator it = friendsIds.begin(); it != friendsIds.end(); it++) { for (std::list<std::string>::iterator it = friendsIds.begin(); it != friendsIds.end(); it++) {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::getSSLChildListOfGPGId() iterating over friends id : " << gpg_id; std::cerr << "p3Peers::getSSLChildListOfGPGId() iterating over friends id : " << gpg_id << std::endl;
std::cerr << std::endl;
#endif #endif
if (mConnMgr->getFriendNetStatus(*it, pcs) && pcs.gpg_id == gpg_id) { if (mConnMgr->getFriendNetStatus(*it, pcs) && pcs.gpg_id == gpg_id) {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::getSSLChildListOfGPGId() adding ssl id : " << pcs.id; std::cerr << "p3Peers::getSSLChildListOfGPGId() adding ssl id : " << pcs.id << std::endl;
std::cerr << std::endl;
#endif #endif
ids.push_back(pcs.id); ids.push_back(pcs.id);
} }
@ -542,8 +526,7 @@ bool p3Peers::getSSLChildListOfGPGId(std::string gpg_id, std::list<std::string>
bool p3Peers::getGPGDetails(std::string id, RsPeerDetails &d) bool p3Peers::getGPGDetails(std::string id, RsPeerDetails &d)
{ {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::getPgpDetails() called for id : " << id; std::cerr << "p3Peers::getPgpDetails() called for id : " << id << std::endl;
std::cerr << std::endl;
#endif #endif
/* get from mAuthMgr */ /* get from mAuthMgr */
@ -553,8 +536,7 @@ bool p3Peers::getGPGDetails(std::string id, RsPeerDetails &d)
std::string p3Peers::getGPGOwnId() std::string p3Peers::getGPGOwnId()
{ {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::getPGPOwnId()"; std::cerr << "p3Peers::getPGPOwnId()" << std::endl;
std::cerr << std::endl;
#endif #endif
/* get from mAuthMgr */ /* get from mAuthMgr */
@ -564,8 +546,7 @@ std::string p3Peers::getGPGOwnId()
std::string p3Peers::getGPGId(std::string sslid_or_gpgid) std::string p3Peers::getGPGId(std::string sslid_or_gpgid)
{ {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::getPGPId()"; std::cerr << "p3Peers::getPGPId()" << std::endl;
std::cerr << std::endl;
#endif #endif
/* get from mAuthMgr */ /* get from mAuthMgr */
@ -578,8 +559,7 @@ std::string p3Peers::getGPGId(std::string sslid_or_gpgid)
} else { } else {
if ( AuthGPG::getAuthGPG()->isGPGId(sslid_or_gpgid)) { if ( AuthGPG::getAuthGPG()->isGPGId(sslid_or_gpgid)) {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::getPGPId() given id is already an gpg id : " << sslid_or_gpgid; std::cerr << "p3Peers::getPGPId() given id is already an gpg id : " << sslid_or_gpgid << std::endl;
std::cerr << std::endl;
#endif #endif
return sslid_or_gpgid; return sslid_or_gpgid;
} }
@ -660,8 +640,7 @@ bool p3Peers::removeFriend(std::string ssl_or_gpgid)
bool p3Peers::connectAttempt(std::string id) bool p3Peers::connectAttempt(std::string id)
{ {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::connectAttempt() " << id; std::cerr << "p3Peers::connectAttempt() " << id << std::endl;
std::cerr << std::endl;
#endif #endif
return mConnMgr->retryConnect(id); return mConnMgr->retryConnect(id);
@ -678,7 +657,9 @@ void p3Peers::allowServerIPDetermination(bool b)
void p3Peers::allowTunnelConnection(bool b) void p3Peers::allowTunnelConnection(bool b)
{ {
#ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::allowTunnelConnection() set tunnel to : " << b << std::endl; std::cerr << "p3Peers::allowTunnelConnection() set tunnel to : " << b << std::endl;
#endif
mConnMgr->setTunnelConnection(b) ; mConnMgr->setTunnelConnection(b) ;
} }
@ -689,15 +670,16 @@ bool p3Peers::getAllowServerIPDetermination()
bool p3Peers::getAllowTunnelConnection() bool p3Peers::getAllowTunnelConnection()
{ {
#ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::getAllowTunnelConnection() tunnel is : " << mConnMgr->getTunnelConnection() << std::endl; std::cerr << "p3Peers::getAllowTunnelConnection() tunnel is : " << mConnMgr->getTunnelConnection() << std::endl;
#endif
return mConnMgr->getTunnelConnection() ; return mConnMgr->getTunnelConnection() ;
} }
bool p3Peers::setLocalAddress(std::string id, std::string addr_str, uint16_t port) bool p3Peers::setLocalAddress(std::string id, std::string addr_str, uint16_t port)
{ {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::setLocalAddress() " << id; std::cerr << "p3Peers::setLocalAddress() " << id << std::endl;
std::cerr << std::endl;
#endif #endif
struct sockaddr_in addr; struct sockaddr_in addr;
@ -722,8 +704,7 @@ bool p3Peers::setLocalAddress(std::string id, std::string addr_str, uint16_t po
bool p3Peers::setLocation(std::string ssl_id, std::string location) bool p3Peers::setLocation(std::string ssl_id, std::string location)
{ {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::setLocation() " << ssl_id; std::cerr << "p3Peers::setLocation() " << ssl_id << std::endl;
std::cerr << std::endl;
#endif #endif
return mConnMgr->setLocation(ssl_id, location); return mConnMgr->setLocation(ssl_id, location);
@ -731,8 +712,7 @@ bool p3Peers::setLocation(std::string ssl_id, std::string location)
bool p3Peers::setExtAddress(std::string id, std::string addr_str, uint16_t port) bool p3Peers::setExtAddress(std::string id, std::string addr_str, uint16_t port)
{ {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::setExtAddress() " << id; std::cerr << "p3Peers::setExtAddress() " << id << std::endl;
std::cerr << std::endl;
#endif #endif
struct sockaddr_in addr; struct sockaddr_in addr;
@ -758,8 +738,7 @@ bool p3Peers::setExtAddress(std::string id, std::string addr_str, uint16_t port
bool p3Peers::setNetworkMode(std::string id, uint32_t extNetMode) bool p3Peers::setNetworkMode(std::string id, uint32_t extNetMode)
{ {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::setNetworkMode() " << id; std::cerr << "p3Peers::setNetworkMode() " << id << std::endl;
std::cerr << std::endl;
#endif #endif
/* translate */ /* translate */
@ -790,8 +769,7 @@ bool
p3Peers::setVisState(std::string id, uint32_t extVisState) p3Peers::setVisState(std::string id, uint32_t extVisState)
{ {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::setVisState() " << id; std::cerr << "p3Peers::setVisState() " << id << std::endl;
std::cerr << std::endl;
#endif #endif
uint32_t visState = 0; uint32_t visState = 0;
@ -808,13 +786,9 @@ p3Peers::setVisState(std::string id, uint32_t extVisState)
std::string std::string
p3Peers::GetRetroshareInvite() p3Peers::GetRetroshareInvite()
{ {
#ifdef P3PEERS_DEBUG #ifdef P3PEERS_DEBUG
std::cerr << "p3Peers::GetRetroshareInvite()"; std::cerr << "p3Peers::GetRetroshareInvite()" << std::endl;
std::cerr << std::endl; #endif
#endif
std::cerr << "p3Peers::GetRetroshareInvite()";
std::cerr << std::endl;
std::string invite = AuthGPG::getAuthGPG()->SaveCertificateToString(AuthGPG::getAuthGPG()->getGPGOwnId()); std::string invite = AuthGPG::getAuthGPG()->SaveCertificateToString(AuthGPG::getAuthGPG()->getGPGOwnId());
@ -833,9 +807,9 @@ p3Peers::GetRetroshareInvite()
invite += out2.str() + ";"; invite += out2.str() + ";";
} }
std::cerr << "p3Peers::GetRetroshareInvite() returns : \n"; #ifdef P3PEERS_DEBUG
std::cerr << invite << std::endl; std::cerr << "p3Peers::GetRetroshareInvite() returns : \n" << invite << std::endl;
#endif
return invite; return invite;
} }

View File

@ -15,7 +15,7 @@ RsAutoUpdatePage::RsAutoUpdatePage(int ms_update_period,QWidget *parent)
void RsAutoUpdatePage::showEvent(QShowEvent *event) void RsAutoUpdatePage::showEvent(QShowEvent *event)
{ {
std::cout << "In show event !!" << std::endl ; //std::cout << "RsAutoUpdatePage::showEvent() In show event !!" << std::endl ;
updateDisplay(); updateDisplay();
} }