mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 07:29:33 -05:00
suppressed debug output
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4860 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
c3be19227d
commit
6c7535a3aa
@ -5,6 +5,10 @@
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
|
||||
/****************************/
|
||||
/* #define DEBUG_PGPUTIL 1 */
|
||||
/****************************/
|
||||
|
||||
#define PGP_PACKET_TAG_PUBLIC_KEY 6
|
||||
#define PGP_PACKET_TAG_USER_ID 13
|
||||
#define PGP_PACKET_TAG_SIGNATURE 2
|
||||
@ -42,8 +46,10 @@ bool PGPKeyManagement::createMinimalKey(const std::string& pgp_certificate,std::
|
||||
|
||||
std::string radix_cert = pgp_certificate.substr(i,j-i) ;
|
||||
|
||||
#ifdef DEBUG_PGPUTIL
|
||||
std::cerr << "extracted radix cert: " << std::endl;
|
||||
std::cerr << radix_cert ;
|
||||
#endif
|
||||
|
||||
// 1 - Convert armored key into binary key
|
||||
//
|
||||
@ -55,7 +61,9 @@ bool PGPKeyManagement::createMinimalKey(const std::string& pgp_certificate,std::
|
||||
|
||||
unsigned char *data = (unsigned char *)keydata ;
|
||||
|
||||
#ifdef DEBUG_PGPUTIL
|
||||
std::cerr << "Total size: " << len << std::endl;
|
||||
#endif
|
||||
|
||||
uint8_t packet_tag;
|
||||
uint32_t packet_length ;
|
||||
@ -69,10 +77,11 @@ bool PGPKeyManagement::createMinimalKey(const std::string& pgp_certificate,std::
|
||||
while(true)
|
||||
{
|
||||
PGPKeyParser::read_packetHeader(data,packet_tag,packet_length) ;
|
||||
|
||||
#ifdef DEBUG_PGPUTIL
|
||||
std::cerr << "Header:" << std::endl;
|
||||
std::cerr << " Packet tag: " << (int)packet_tag << std::endl;
|
||||
std::cerr << " Packet length: " << packet_length << std::endl;
|
||||
#endif
|
||||
|
||||
data += packet_length ;
|
||||
|
||||
@ -99,8 +108,10 @@ bool PGPKeyManagement::createMinimalKey(const std::string& pgp_certificate,std::
|
||||
std::string crc_string ;
|
||||
Radix64::encode((const char *)tmp,3,crc_string) ;
|
||||
|
||||
#ifdef DEBUG_PGPUTIL
|
||||
std::cerr << "After signature pruning: " << std::endl;
|
||||
std::cerr << outstring << std::endl;
|
||||
#endif
|
||||
|
||||
cleaned_certificate = std::string(PGP_CERTIFICATE_START_STRING) + "\n" + version_string + "\n\n" ;
|
||||
|
||||
@ -192,13 +203,17 @@ void PGPKeyParser::read_packetHeader(unsigned char *& data,uint8_t& packet_tag,u
|
||||
|
||||
if(new_format)
|
||||
{
|
||||
#ifdef DEBUG_PGPUTIL
|
||||
std::cerr << "Packet is in new format" << std::endl;
|
||||
#endif
|
||||
packet_tag = b1 & 0x3f ;
|
||||
packet_length = read_125Size(data) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef DEBUG_PGPUTIL
|
||||
std::cerr << "Packet is in old format" << std::endl;
|
||||
#endif
|
||||
uint8_t length_type = b1 & 0x03 ;
|
||||
packet_tag = (b1 & 0x3c) >> 2 ;
|
||||
|
||||
|
@ -121,14 +121,18 @@ static void updateItem(QTreeWidgetItem *item, ChatLobbyId id, const std::string
|
||||
|
||||
void ChatLobbyWidget::updateDisplay()
|
||||
{
|
||||
#ifdef CHAT_LOBBY_GUI_DEBUG
|
||||
std::cerr << "updating chat lobby display!" << std::endl;
|
||||
#endif
|
||||
std::vector<PublicChatLobbyRecord> publicLobbies;
|
||||
rsMsgs->getListOfNearbyChatLobbies(publicLobbies);
|
||||
|
||||
std::list<ChatLobbyInfo> lobbies;
|
||||
rsMsgs->getChatLobbyList(lobbies);
|
||||
|
||||
#ifdef CHAT_LOBBY_GUI_DEBUG
|
||||
std::cerr << "got " << publicLobbies.size() << " public lobbies, and " << lobbies.size() << " private lobbies." << std::endl;
|
||||
#endif
|
||||
|
||||
// now, do a nice display of lobbies
|
||||
|
||||
|
@ -382,7 +382,9 @@ void NotifyQt::notifyListChange(int list, int type)
|
||||
emit privateChatChanged(list, type);
|
||||
break;
|
||||
case NOTIFY_LIST_CHAT_LOBBY_LIST:
|
||||
#ifdef NOTIFY_DEBUG
|
||||
std::cerr << "received notify chat lobby list" << std::endl;
|
||||
#endif
|
||||
emit lobbyListChanged();
|
||||
|
||||
case NOTIFY_LIST_GROUPLIST:
|
||||
|
Loading…
Reference in New Issue
Block a user