mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
still further log cleanings
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2240 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
6f1e4623ab
commit
1c51a0faab
@ -1147,7 +1147,7 @@ bool AuthSSL::SignDataBin(const void *data, const uint32_t len,
|
||||
return true;
|
||||
}
|
||||
|
||||
#define AUTHSSL_DEBUG2
|
||||
//#define AUTHSSL_DEBUG2
|
||||
bool AuthSSL::VerifyOtherSignBin(const void *data, const uint32_t len,
|
||||
unsigned char *sign, unsigned int signlen, std::string sslCert) {
|
||||
X509 *x509 = loadX509FromPEM(sslCert);
|
||||
|
@ -471,7 +471,7 @@ void p3ConnectMgr::statusTick()
|
||||
* etc.
|
||||
*/
|
||||
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
std::cerr << "p3ConnectMgr::statusTick()" << std::endl;
|
||||
#endif
|
||||
std::list<std::string> retryIds;
|
||||
@ -507,7 +507,7 @@ void p3ConnectMgr::statusTick()
|
||||
if ((it->second.state & RS_PEER_S_ONLINE) &&
|
||||
(it->second.lastavailable < oldavail))
|
||||
{
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
std::cerr << "p3ConnectMgr::statusTick() ONLINE TIMEOUT for: ";
|
||||
std::cerr << it->first;
|
||||
std::cerr << std::endl;
|
||||
@ -530,7 +530,7 @@ void p3ConnectMgr::statusTick()
|
||||
|
||||
for(it2 = retryIds.begin(); it2 != retryIds.end(); it2++)
|
||||
{
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
std::cerr << "p3ConnectMgr::statusTick() RETRY TIMEOUT for: ";
|
||||
std::cerr << *it2;
|
||||
std::cerr << std::endl;
|
||||
@ -547,7 +547,7 @@ void p3ConnectMgr::statusTick()
|
||||
void p3ConnectMgr::netTick()
|
||||
{
|
||||
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
//std::cerr << "p3ConnectMgr::netTick()" << std::endl;
|
||||
#endif
|
||||
|
||||
@ -574,21 +574,21 @@ void p3ConnectMgr::netTick()
|
||||
{
|
||||
case RS_NET_NEED_RESET:
|
||||
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
std::cerr << "p3ConnectMgr::netTick() STATUS: NEED_RESET" << std::endl;
|
||||
#endif
|
||||
netReset();
|
||||
break;
|
||||
|
||||
case RS_NET_UNKNOWN:
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
std::cerr << "p3ConnectMgr::netTick() STATUS: UNKNOWN" << std::endl;
|
||||
#endif
|
||||
netStartup();
|
||||
break;
|
||||
|
||||
case RS_NET_UPNP_INIT:
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
std::cerr << "p3ConnectMgr::netTick() STATUS: UPNP_INIT" << std::endl;
|
||||
#endif
|
||||
netExtFinderAddressCheck();
|
||||
@ -596,14 +596,14 @@ void p3ConnectMgr::netTick()
|
||||
break;
|
||||
|
||||
case RS_NET_UPNP_SETUP:
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
std::cerr << "p3ConnectMgr::netTick() STATUS: UPNP_SETUP" << std::endl;
|
||||
#endif
|
||||
netUpnpCheck();
|
||||
break;
|
||||
|
||||
case RS_NET_DONE:
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
//std::cerr << "p3ConnectMgr::netTick() STATUS: DONE" << std::endl;
|
||||
#endif
|
||||
|
||||
@ -612,7 +612,7 @@ void p3ConnectMgr::netTick()
|
||||
case RS_NET_LOOPBACK:
|
||||
//don't do a shutdown because a client in a computer without local network might be usefull for debug.
|
||||
//shutdown();
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
std::cerr << "p3ConnectMgr::netTick() STATUS: RS_NET_LOOPBACK" << std::endl;
|
||||
#endif
|
||||
default:
|
||||
@ -686,7 +686,7 @@ void p3ConnectMgr::netUpnpCheck()
|
||||
connMtx.lock(); /* LOCK MUTEX */
|
||||
|
||||
time_t delta = time(NULL) - mNetInitTS;
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
std::cerr << "p3ConnectMgr time since last reset : " << delta << std::endl;
|
||||
#endif
|
||||
|
||||
@ -697,10 +697,10 @@ void p3ConnectMgr::netUpnpCheck()
|
||||
|
||||
if ((upnpState == 0) && (delta > MAX_UPNP_INIT))
|
||||
{
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
std::cerr << "p3ConnectMgr::netUpnpCheck() ";
|
||||
std::cerr << "Upnp Check failed." << std::endl;
|
||||
#endif
|
||||
#endif
|
||||
/* fallback to UDP startup */
|
||||
connMtx.lock(); /* LOCK MUTEX */
|
||||
|
||||
@ -711,10 +711,10 @@ void p3ConnectMgr::netUpnpCheck()
|
||||
}
|
||||
else if ((upnpState > 0) && netAssistExtAddress(extAddr))
|
||||
{
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
std::cerr << "p3ConnectMgr::netUpnpCheck() ";
|
||||
std::cerr << "Upnp Check successed." << std::endl;
|
||||
#endif
|
||||
#endif
|
||||
/* switch to UDP startup */
|
||||
connMtx.lock(); /* LOCK MUTEX */
|
||||
|
||||
@ -736,14 +736,14 @@ void p3ConnectMgr::netUpnpCheck()
|
||||
void p3ConnectMgr::networkConsistencyCheck()
|
||||
{
|
||||
time_t delta;
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
delta = time(NULL) - mNetInitTS;
|
||||
std::cerr << "p3ConnectMgr::networkConsistencyCheck() time since last reset : " << delta << std::endl;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
bool doNetReset = false;
|
||||
//if one of the flag is degrated from true to false during last tick, let's do a reset
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
std::cerr << "p3ConnectMgr::networkConsistencyCheck() net flags : " << std::endl;
|
||||
std::cerr << " oldnetFlagLocalOk : " << oldnetFlagLocalOk << ". netFlagLocalOk : " << netFlagLocalOk << "." << std::endl;
|
||||
std::cerr << " oldnetFlagUpnpOk : " << oldnetFlagUpnpOk << ". netFlagUpnpOk : " << netFlagUpnpOk << "." << std::endl;
|
||||
@ -757,7 +757,7 @@ void p3ConnectMgr::networkConsistencyCheck()
|
||||
|| (!netFlagStunOk && oldnetFlagStunOk)
|
||||
|| (!netFlagExtraAddressCheckOk && oldnetFlagExtraAddressCheckOk)
|
||||
) {
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
std::cerr << "p3ConnectMgr::networkConsistencyCheck() A net flag went down." << std::endl;
|
||||
#endif
|
||||
|
||||
@ -779,13 +779,13 @@ void p3ConnectMgr::networkConsistencyCheck()
|
||||
if (!doNetReset) {//set an external address. if ip adresses are different, let's use the stun address, then the extaddrfinder and then the upnp address.
|
||||
struct sockaddr_in extAddr;
|
||||
if (getUpnpExtAddress(extAddr)) {
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
std::cerr << "p3ConnectMgr::networkConsistencyCheck() using getUpnpExtAddress for ownState.serveraddr." << std::endl;
|
||||
#endif
|
||||
ownState.currentserveraddr = extAddr;
|
||||
} else if (getExtFinderExtAddress(extAddr)) {
|
||||
netExtFinderAddressCheck(); //so we put the extra address flag ok.
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
std::cerr << "p3ConnectMgr::networkConsistencyCheck() using getExtFinderExtAddress for ownState.serveraddr." << std::endl;
|
||||
#endif
|
||||
ownState.currentserveraddr = extAddr;
|
||||
@ -798,7 +798,7 @@ void p3ConnectMgr::networkConsistencyCheck()
|
||||
/* get last contact detail */
|
||||
is_connected = it->second.state & RS_PEER_S_CONNECTED;
|
||||
}
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
if (is_connected) {
|
||||
std::cerr << "p3ConnectMgr::networkConsistencyCheck() not doing a net reset because a peer is connected." << std::endl;
|
||||
} else {
|
||||
@ -823,12 +823,12 @@ void p3ConnectMgr::networkConsistencyCheck()
|
||||
//don't do a reset it if the network init is not finished
|
||||
delta = time(NULL) - mNetInitTS;
|
||||
if (delta > MAX_NETWORK_INIT) {
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
std::cerr << "p3ConnectMgr::networkConsistencyCheck() doing a net reset." << std::endl;
|
||||
#endif
|
||||
netReset();
|
||||
} else {
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
std::cerr << "p3ConnectMgr::networkConsistencyCheck() reset delayed : p3ConnectMgr time since last reset : " << delta;
|
||||
std::cerr << ". Cannot reset before : " << MAX_NETWORK_INIT << " sec" << std::endl;
|
||||
#endif
|
||||
@ -839,12 +839,12 @@ void p3ConnectMgr::networkConsistencyCheck()
|
||||
void p3ConnectMgr::netExtFinderAddressCheck()
|
||||
{ struct sockaddr_in tmpip;
|
||||
if (getExtFinderExtAddress(tmpip)) {
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
std::cerr << "p3ConnectMgr::netExtraAddressCheck() return true" << std::endl;
|
||||
#endif
|
||||
netFlagExtraAddressCheckOk = true;
|
||||
} else {
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
std::cerr << "p3ConnectMgr::netExtraAddressCheck() return false" << std::endl;
|
||||
#endif
|
||||
netFlagExtraAddressCheckOk = false;
|
||||
@ -2830,7 +2830,7 @@ bool p3ConnectMgr::checkNetAddress()
|
||||
ownState.updateIpAddressList(ipAddressTimed);
|
||||
|
||||
|
||||
#ifdef CONN_DEBUG
|
||||
#ifdef CONN_DEBUG_TICK
|
||||
std::cerr << "p3ConnectMgr::checkNetAddress() Final Local Address: " << inet_ntoa(ownState.currentlocaladdr.sin_addr);
|
||||
std::cerr << ":" << ntohs(ownState.currentlocaladdr.sin_port) << std::endl;
|
||||
#endif
|
||||
|
@ -447,8 +447,8 @@ int pqiarchive::readPkt(RsItem **item_out, long *ts_out)
|
||||
}
|
||||
|
||||
// create packet, based on header.
|
||||
std::cerr << "Read Data Block -> Incoming Pkt(";
|
||||
std::cerr << blen + extralen << ")" << std::endl;
|
||||
//std::cerr << "Read Data Block -> Incoming Pkt(";
|
||||
//std::cerr << blen + extralen << ")" << std::endl;
|
||||
uint32_t readbytes = extralen + blen;
|
||||
|
||||
RsItem *item = rsSerialiser->deserialise(block, &readbytes);
|
||||
|
@ -311,10 +311,10 @@ bool p3Channels::locked_eventDuplicateMsg(GroupInfo *grp, RsDistribMsg *msg, std
|
||||
std::string nullId;
|
||||
|
||||
|
||||
std::cerr << "p3Channels::locked_eventDuplicateMsg() ";
|
||||
std::cerr << " grpId: " << grpId << " msgId: " << msgId;
|
||||
std::cerr << " peerId: " << id;
|
||||
std::cerr << std::endl;
|
||||
// std::cerr << "p3Channels::locked_eventDuplicateMsg() ";
|
||||
// std::cerr << " grpId: " << grpId << " msgId: " << msgId;
|
||||
// std::cerr << " peerId: " << id;
|
||||
// std::cerr << std::endl;
|
||||
|
||||
|
||||
RsChannelMsg *chanMsg = dynamic_cast<RsChannelMsg *>(msg);
|
||||
@ -389,11 +389,11 @@ bool p3Channels::locked_eventNewMsg(GroupInfo *grp, RsDistribMsg *msg, std::stri
|
||||
std::string msgId = msg->msgId;
|
||||
std::string nullId;
|
||||
|
||||
std::cerr << "p3Channels::locked_eventNewMsg() ";
|
||||
std::cerr << " grpId: " << grpId;
|
||||
std::cerr << " msgId: " << msgId;
|
||||
std::cerr << " peerId: " << id;
|
||||
std::cerr << std::endl;
|
||||
// std::cerr << "p3Channels::locked_eventNewMsg() ";
|
||||
// std::cerr << " grpId: " << grpId;
|
||||
// std::cerr << " msgId: " << msgId;
|
||||
// std::cerr << " peerId: " << id;
|
||||
// std::cerr << std::endl;
|
||||
|
||||
getPqiNotify()->AddFeedItem(RS_FEED_ITEM_CHAN_MSG, grpId, msgId, nullId);
|
||||
|
||||
@ -415,10 +415,10 @@ void p3Channels::locked_notifyGroupChanged(GroupInfo &grp, uint32_t flags)
|
||||
std::string msgId;
|
||||
std::string nullId;
|
||||
|
||||
std::cerr << "p3Channels::locked_notifyGroupChanged() ";
|
||||
std::cerr << grpId;
|
||||
std::cerr << " flags:" << flags;
|
||||
std::cerr << std::endl;
|
||||
// std::cerr << "p3Channels::locked_notifyGroupChanged() ";
|
||||
// std::cerr << grpId;
|
||||
// std::cerr << " flags:" << flags;
|
||||
// std::cerr << std::endl;
|
||||
|
||||
switch(flags)
|
||||
{
|
||||
|
@ -60,7 +60,7 @@ void FileTransferInfoWidget::resizeEvent(QResizeEvent *event)
|
||||
}
|
||||
void FileTransferInfoWidget::updateDisplay()
|
||||
{
|
||||
std::cout << "In TaskGraphPainterWidget::updateDisplay()" << std::endl ;
|
||||
//std::cout << "In TaskGraphPainterWidget::updateDisplay()" << std::endl ;
|
||||
|
||||
bool ok=true ;
|
||||
FileInfo nfo ;
|
||||
@ -70,7 +70,7 @@ void FileTransferInfoWidget::updateDisplay()
|
||||
if(!rsFiles->FileDownloadChunksDetails(_file_hash, info))
|
||||
ok = false ;
|
||||
|
||||
std::cout << "got details for file " << nfo.fname << std::endl ;
|
||||
//std::cout << "got details for file " << nfo.fname << std::endl ;
|
||||
|
||||
pixmap = QPixmap(size());
|
||||
pixmap.fill(this, 0, 0);
|
||||
|
@ -804,7 +804,9 @@ void PeersDialog::configurefriend()
|
||||
|
||||
void PeersDialog::resetStatusBar()
|
||||
{
|
||||
#ifdef PEERS_DEBUG
|
||||
std::cerr << "PeersDialog: reseting status bar." << std::endl ;
|
||||
#endif
|
||||
|
||||
ui.statusStringLabel->setText(QString("")) ;
|
||||
}
|
||||
@ -882,7 +884,9 @@ void PeersDialog::insertChat()
|
||||
std::list<ChatInfo> newchat;
|
||||
if (!rsMsgs->getNewChat(newchat))
|
||||
{
|
||||
#ifdef PEERS_DEBUG
|
||||
std::cerr << "could not get new chat." << std::endl ;
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
#ifdef PEERS_DEBUG
|
||||
|
@ -36,7 +36,9 @@ void NotifyQt::notifyErrorMsg(int list, int type, std::string msg)
|
||||
|
||||
void NotifyQt::notifyOwnAvatarChanged()
|
||||
{
|
||||
#ifdef NOTIFY_DEBUG
|
||||
std::cerr << "Notifyqt:: notified that own avatar changed" << std::endl ;
|
||||
#endif
|
||||
emit ownAvatarChanged() ;
|
||||
}
|
||||
|
||||
@ -49,31 +51,41 @@ std::string NotifyQt::askForPassword(const std::string& window_title,const std::
|
||||
|
||||
void NotifyQt::notifyOwnStatusMessageChanged()
|
||||
{
|
||||
#ifdef NOTIFY_DEBUG
|
||||
std::cerr << "Notifyqt:: notified that own avatar changed" << std::endl ;
|
||||
#endif
|
||||
emit ownStatusMessageChanged() ;
|
||||
}
|
||||
|
||||
void NotifyQt::notifyPeerHasNewAvatar(std::string peer_id)
|
||||
{
|
||||
#ifdef NOTIFY_DEBUG
|
||||
std::cerr << "notifyQt: notification of new avatar." << std::endl ;
|
||||
#endif
|
||||
emit peerHasNewAvatar(QString::fromStdString(peer_id)) ;
|
||||
}
|
||||
|
||||
void NotifyQt::notifyCustomState(const std::string& peer_id)
|
||||
{
|
||||
#ifdef NOTIFY_DEBUG
|
||||
std::cerr << "notifyQt: Received custom status string notification" << std::endl ;
|
||||
#endif
|
||||
emit peerHasNewCustomStateString(QString::fromStdString(peer_id)) ;
|
||||
}
|
||||
|
||||
void NotifyQt::notifyChatStatus(const std::string& peer_id,const std::string& status_string,bool is_private)
|
||||
{
|
||||
#ifdef NOTIFY_DEBUG
|
||||
std::cerr << "notifyQt: Received chat status string: " << status_string << std::endl ;
|
||||
#endif
|
||||
emit chatStatusChanged(QString::fromStdString(peer_id),QString::fromStdString(status_string),is_private) ;
|
||||
}
|
||||
|
||||
void NotifyQt::notifyTurtleSearchResult(uint32_t search_id,const std::list<TurtleFileInfo>& files)
|
||||
{
|
||||
#ifdef NOTIFY_DEBUG
|
||||
std::cerr << "in notify search result..." << std::endl ;
|
||||
#endif
|
||||
|
||||
for(std::list<TurtleFileInfo>::const_iterator it(files.begin());it!=files.end();++it)
|
||||
{
|
||||
@ -108,25 +120,25 @@ void NotifyQt::notifyListChange(int list, int type)
|
||||
switch(list)
|
||||
{
|
||||
case NOTIFY_LIST_NEIGHBOURS:
|
||||
#ifdef DEBUG
|
||||
#ifdef NOTIFY_DEBUG
|
||||
std::cerr << "received neighbrs changed" << std::endl ;
|
||||
#endif
|
||||
emit neighborsChanged();
|
||||
break;
|
||||
case NOTIFY_LIST_FRIENDS:
|
||||
#ifdef DEBUG
|
||||
#ifdef NOTIFY_DEBUG
|
||||
std::cerr << "received friends changed" << std::endl ;
|
||||
#endif
|
||||
emit friendsChanged() ;
|
||||
break;
|
||||
case NOTIFY_LIST_DIRLIST_LOCAL:
|
||||
#ifdef DEBUG
|
||||
#ifdef NOTIFY_DEBUG
|
||||
std::cerr << "received files changed" << std::endl ;
|
||||
#endif
|
||||
emit filesPostModChanged(true) ; /* Local */
|
||||
break;
|
||||
case NOTIFY_LIST_DIRLIST_FRIENDS:
|
||||
#ifdef DEBUG
|
||||
#ifdef NOTIFY_DEBUG
|
||||
std::cerr << "received files changed" << std::endl ;
|
||||
#endif
|
||||
emit filesPostModChanged(false) ; /* Local */
|
||||
@ -134,7 +146,7 @@ void NotifyQt::notifyListChange(int list, int type)
|
||||
case NOTIFY_LIST_SEARCHLIST:
|
||||
break;
|
||||
case NOTIFY_LIST_MESSAGELIST:
|
||||
#ifdef DEBUG
|
||||
#ifdef NOTIFY_DEBUG
|
||||
std::cerr << "received msg changed" << std::endl ;
|
||||
#endif
|
||||
emit messagesChanged() ;
|
||||
@ -142,13 +154,13 @@ void NotifyQt::notifyListChange(int list, int type)
|
||||
case NOTIFY_LIST_CHANNELLIST:
|
||||
break;
|
||||
case NOTIFY_LIST_TRANSFERLIST:
|
||||
#ifdef DEBUG
|
||||
#ifdef NOTIFY_DEBUG
|
||||
std::cerr << "received transfer changed" << std::endl ;
|
||||
#endif
|
||||
emit transfersChanged() ;
|
||||
break;
|
||||
case NOTIFY_LIST_CONFIG:
|
||||
#ifdef DEBUG
|
||||
#ifdef NOTIFY_DEBUG
|
||||
std::cerr << "received config changed" << std::endl ;
|
||||
#endif
|
||||
emit configChanged() ;
|
||||
|
Loading…
Reference in New Issue
Block a user