mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 16:39:29 -05:00
removed some debug info
This commit is contained in:
parent
083dc626da
commit
d1b09b93b9
@ -3734,7 +3734,9 @@ bool RsGxsNetService::processTransactionForDecryption(NxsTransaction *tr)
|
||||
|
||||
if(encrypted_item == NULL)
|
||||
{
|
||||
std::cerr << " skipping unencrypted item..." << std::endl;
|
||||
#ifdef NXS_NET_DEBUG_7
|
||||
GXSNETDEBUG_P_(peerId) << " skipping unencrypted item..." << std::endl;
|
||||
#endif
|
||||
++it ;
|
||||
continue ;
|
||||
}
|
||||
@ -3744,7 +3746,9 @@ bool RsGxsNetService::processTransactionForDecryption(NxsTransaction *tr)
|
||||
|
||||
if(private_keys.empty())
|
||||
{
|
||||
std::cerr << " need to retrieve private keys..." << std::endl;
|
||||
#ifdef NXS_NET_DEBUG_7
|
||||
GXSNETDEBUG_P_(peerId) << " need to retrieve private keys..." << std::endl;
|
||||
#endif
|
||||
|
||||
std::list<RsGxsId> own_keys ;
|
||||
mGixs->getOwnIds(own_keys) ;
|
||||
@ -3756,7 +3760,9 @@ bool RsGxsNetService::processTransactionForDecryption(NxsTransaction *tr)
|
||||
if(mGixs->getPrivateKey(*it,private_key))
|
||||
{
|
||||
private_keys.push_back(private_key) ;
|
||||
std::cerr << " retrieved private key " << *it << std::endl;
|
||||
#ifdef NXS_NET_DEBUG_7
|
||||
GXSNETDEBUG_P_(peerId)<< " retrieved private key " << *it << std::endl;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3768,7 +3774,9 @@ bool RsGxsNetService::processTransactionForDecryption(NxsTransaction *tr)
|
||||
}
|
||||
if(key_loading_failed)
|
||||
{
|
||||
std::cerr << " Some keys not loaded.Returning false to retry later." << std::endl;
|
||||
#ifdef NXS_NET_DEBUG_7
|
||||
GXSNETDEBUG_P_(peerId) << " Some keys not loaded.Returning false to retry later." << std::endl;
|
||||
#endif
|
||||
return false ;
|
||||
}
|
||||
|
||||
@ -3777,14 +3785,18 @@ bool RsGxsNetService::processTransactionForDecryption(NxsTransaction *tr)
|
||||
unsigned char *decrypted_mem = NULL;
|
||||
uint32_t decrypted_len =0;
|
||||
|
||||
std::cerr << " Trying to decrypt item..." ;
|
||||
#ifdef NXS_NET_DEBUG_7
|
||||
GXSNETDEBUG_P_(peerId)<< " Trying to decrypt item..." ;
|
||||
#endif
|
||||
|
||||
if(!GxsSecurity::decrypt(decrypted_mem,decrypted_len, (uint8_t*)encrypted_item->encrypted_data.bin_data,encrypted_item->encrypted_data.bin_len,private_keys))
|
||||
{
|
||||
std::cerr << "Failed! Cannot decrypt this item." << std::endl;
|
||||
decrypted_mem = NULL ; // for safety
|
||||
}
|
||||
std::cerr << " Succeeded! deserialising..." << std::endl;
|
||||
#ifdef NXS_NET_DEBUG_7
|
||||
GXSNETDEBUG_P_(peerId)<< " Succeeded! deserialising..." << std::endl;
|
||||
#endif
|
||||
|
||||
// deserialise the item
|
||||
|
||||
@ -3813,7 +3825,9 @@ bool RsGxsNetService::processTransactionForDecryption(NxsTransaction *tr)
|
||||
|
||||
if(nxsitem != NULL)
|
||||
{
|
||||
std::cerr << " Replacing the encrypted item with the clear one." << std::endl;
|
||||
#ifdef NXS_NET_DEBUG_7
|
||||
GXSNETDEBUG_P_(peerId) << " Replacing the encrypted item with the clear one." << std::endl;
|
||||
#endif
|
||||
tr->mItems.insert(it,nxsitem) ; // inserts before it, so no need to ++it
|
||||
}
|
||||
|
||||
|
@ -29,8 +29,7 @@
|
||||
#include "serialiser/rstlvbase.h"
|
||||
#include "serialiser/rsbaseserial.h"
|
||||
|
||||
#define CIRCLE_DEBUG 1
|
||||
|
||||
//#define CIRCLE_DEBUG 1
|
||||
|
||||
uint32_t RsGxsCircleSerialiser::size(RsItem *item)
|
||||
{
|
||||
|
@ -37,7 +37,6 @@
|
||||
/****
|
||||
* #define DEBUG_CIRCLES 1
|
||||
****/
|
||||
#define DEBUG_CIRCLES 1
|
||||
|
||||
RsGxsCircles *rsGxsCircles = NULL;
|
||||
|
||||
|
@ -871,12 +871,9 @@ void CreateCircleDialog::MembershipListCustomPopupMenu( QPoint )
|
||||
QMenu contextMnu( this );
|
||||
|
||||
QTreeWidgetItem *item = ui.treeWidget_membership->currentItem();
|
||||
if (item) {
|
||||
|
||||
if (item && !mReadOnly)
|
||||
contextMnu.addAction(QIcon(":/images/delete.png"), tr("Remove Member"), this, SLOT(removeMember()));
|
||||
|
||||
}
|
||||
|
||||
contextMnu.exec(QCursor::pos());
|
||||
}
|
||||
|
||||
|
@ -359,7 +359,7 @@ void IdDialog::loadCircleGroupMeta(const uint32_t &token)
|
||||
if(!mExternalOtherCircleItem)
|
||||
{
|
||||
mExternalOtherCircleItem = new QTreeWidgetItem();
|
||||
mExternalOtherCircleItem->setText(0, tr("Circles (Other)"));
|
||||
mExternalOtherCircleItem->setText(0, tr("Other visible circles"));
|
||||
|
||||
ui->treeWidget_membership->addTopLevelItem(mExternalOtherCircleItem);
|
||||
}
|
||||
@ -374,7 +374,7 @@ void IdDialog::loadCircleGroupMeta(const uint32_t &token)
|
||||
if(!mExternalAdminCircleItem)
|
||||
{
|
||||
mExternalAdminCircleItem = new QTreeWidgetItem();
|
||||
mExternalAdminCircleItem->setText(0, tr("Circles I own"));
|
||||
mExternalAdminCircleItem->setText(0, tr("Circles I admin"));
|
||||
ui->treeWidget_membership->addTopLevelItem(mExternalAdminCircleItem);
|
||||
}
|
||||
|
||||
|
@ -135,8 +135,6 @@ static void loadPrivateIdsCallback(GxsIdDetailsType type, const RsIdentityDetail
|
||||
QString text = GxsIdDetails::getNameForType(type, details);
|
||||
QString id = QString::fromStdString(details.mId.toStdString());
|
||||
|
||||
std::cerr << "chooser: in callback. details.mId=" << details.mId << ", name=" << details.mNickname << " count before=" << chooser->count()<< std::endl;
|
||||
|
||||
/* Find and replace text of exisiting item */
|
||||
int index = chooser->findData(id);
|
||||
if (index >= 0) {
|
||||
@ -146,7 +144,6 @@ static void loadPrivateIdsCallback(GxsIdDetailsType type, const RsIdentityDetail
|
||||
chooser->addItem(text, id);
|
||||
index = chooser->count() - 1;
|
||||
}
|
||||
std::cerr << "chooser: in callback. count after=" << chooser->count()<< std::endl;
|
||||
|
||||
QList<QIcon> icons;
|
||||
|
||||
|
@ -57,7 +57,6 @@
|
||||
/*****
|
||||
* #define NOTIFY_DEBUG
|
||||
****/
|
||||
#define NOTIFY_DEBUG
|
||||
|
||||
/*static*/ NotifyQt *NotifyQt::_instance = NULL;
|
||||
/*static*/ bool NotifyQt::_disableAllToaster = false;
|
||||
|
@ -5,6 +5,8 @@
|
||||
|
||||
#include <retroshare/rsgxsifacehelper.h>
|
||||
|
||||
//#define DEBUG_GXS_BROADCAST 1
|
||||
|
||||
// previously gxs allowed only one event consumer to poll for changes
|
||||
// this required a single broadcast instance per service
|
||||
// now the update notify works through rsnotify and notifyqt
|
||||
@ -43,6 +45,7 @@ RsGxsUpdateBroadcast *RsGxsUpdateBroadcast::get(RsGxsIfaceHelper *ifaceImpl)
|
||||
|
||||
void RsGxsUpdateBroadcast::onChangesReceived(const RsGxsChanges& changes)
|
||||
{
|
||||
#ifdef DEBUG_GXS_BROADCAST
|
||||
std::cerr << "onChangesReceived()" << std::endl;
|
||||
|
||||
{
|
||||
@ -57,6 +60,7 @@ void RsGxsUpdateBroadcast::onChangesReceived(const RsGxsChanges& changes)
|
||||
for(uint32_t i=0;i<it->second.size();++i)
|
||||
std::cerr << " grp id: " << it->first << ". Msg Meta " << it->second[i] << std::endl;
|
||||
}
|
||||
#endif
|
||||
if(changes.mService != mIfaceImpl->getTokenService())
|
||||
{
|
||||
// std::cerr << "(EE) Incorrect service. Dropping." << std::endl;
|
||||
|
Loading…
Reference in New Issue
Block a user