mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
improved debug info in a few places
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8584 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
c0ad7d3e46
commit
249c827f95
@ -170,9 +170,9 @@ void ftController::addFileSource(const RsFileHash& hash,const RsPeerId& peer_id)
|
||||
|
||||
std::map<RsFileHash, ftFileControl*>::iterator it = mDownloads.find(hash);
|
||||
|
||||
//#ifdef CONTROL_DEBUG
|
||||
#ifdef CONTROL_DEBUG
|
||||
std::cerr << "ftController: Adding source " << peer_id << " to current download hash=" << hash ;
|
||||
//#endif
|
||||
#endif
|
||||
if(it != mDownloads.end())
|
||||
{
|
||||
it->second->mTransfer->addFileSource(peer_id);
|
||||
|
@ -1516,9 +1516,9 @@ void p3GRouter::handleIncomingDataItem(RsGRouterGenericDataItem *data_item)
|
||||
#endif
|
||||
if(!verifySignedDataItem(data_item)) // we should get proper flags out of this
|
||||
{
|
||||
#ifdef GROUTER_DEBUG
|
||||
std::cerr << " verifying item signature: FAILED! Droping that item" ;
|
||||
#endif
|
||||
std::cerr << " You probably received a message from a person you don't have key." << std::endl;
|
||||
std::cerr << " Signature key ID: " << data_item->signature.keyId << std::endl;
|
||||
return ;
|
||||
}
|
||||
#ifdef GROUTER_DEBUG
|
||||
@ -1814,11 +1814,12 @@ bool p3GRouter::verifySignedDataItem(RsGRouterAbstractMsgItem *item)
|
||||
{
|
||||
switch(error_status)
|
||||
{
|
||||
case RsGixs::RS_GIXS_ERROR_KEY_NOT_AVAILABLE: std::cerr << "(EE) Key is not available. Cannot verify." << std::endl;
|
||||
case RsGixs::RS_GIXS_ERROR_KEY_NOT_AVAILABLE: std::cerr << "(EE) Key for GXS Id " << item->signature.keyId << " is not available. Cannot verify." << std::endl;
|
||||
break ;
|
||||
case RsGixs::RS_GIXS_ERROR_SIGNATURE_MISMATCH: std::cerr << "(EE) Signature mismatch. Spoofing/Corrupted/MITM?." << std::endl;
|
||||
break ;
|
||||
default: break ;
|
||||
default: std::cerr << "(EE) Signature verification failed on GRouter message. Unknown error status: " << error_status << std::endl;
|
||||
break ;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "serialiser/rstlvbase.h"
|
||||
#include "serialiser/rsbaseserial.h"
|
||||
|
||||
#define GXSCOMMENT_DEBUG 1
|
||||
//#define GXSCOMMENT_DEBUG 1
|
||||
|
||||
|
||||
uint32_t RsGxsCommentSerialiser::size(RsItem *item)
|
||||
|
@ -939,11 +939,15 @@ bool SSGxsChannelGroup::load(const std::string &input)
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef GXSCHANNELS_DEBUG
|
||||
std::cerr << "SSGxsChannelGroup::load(): could not parse string \"" << input << "\"" << std::endl;
|
||||
#endif
|
||||
return false ;
|
||||
}
|
||||
|
||||
#ifdef GXSCHANNELS_DEBUG
|
||||
std::cerr << "DECODED STRING: autoDL=" << mAutoDownload << ", directory=\"" << mDownloadDirectory << "\"" << std::endl;
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -965,7 +969,9 @@ std::string SSGxsChannelGroup::save() const
|
||||
output += " {P:" + encoded_str + "}";
|
||||
}
|
||||
|
||||
#ifdef GXSCHANNELS_DEBUG
|
||||
std::cerr << "ENCODED STRING: " << output << std::endl;
|
||||
#endif
|
||||
|
||||
return output;
|
||||
}
|
||||
|
@ -718,9 +718,7 @@ bool p3IdService::validateData(const uint8_t *data,uint32_t data_size,const RsTl
|
||||
|
||||
if(signature_key.keyData.bin_data == NULL)
|
||||
{
|
||||
#ifdef DEBUG_IDS
|
||||
std::cerr << "(EE) Cannot validate signature for unknown key " << signature.keyId << std::endl;
|
||||
#endif
|
||||
signing_error = RS_GIXS_ERROR_KEY_NOT_AVAILABLE ;
|
||||
return false;
|
||||
}
|
||||
|
@ -470,7 +470,7 @@ void RSPermissionMatrixWidget::paintEvent(QPaintEvent *)
|
||||
QString remote_status = remotely_allowed?tr("Enabled by remote peer"):tr("Disabled by remote peer") ;
|
||||
|
||||
if(!service_perms.mDefaultAllowed)
|
||||
local_status = tr("Switched Off") ;
|
||||
local_status = tr("Globally switched Off") ;
|
||||
|
||||
const QFont& font(_painter->font()) ;
|
||||
QFontMetrics fm(font);
|
||||
|
Loading…
Reference in New Issue
Block a user