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:
csoler 2012-01-28 13:20:01 +00:00
parent c3be19227d
commit 6c7535a3aa
3 changed files with 22 additions and 1 deletions

View File

@ -5,6 +5,10 @@
#include <iostream> #include <iostream>
#include <stdexcept> #include <stdexcept>
/****************************/
/* #define DEBUG_PGPUTIL 1 */
/****************************/
#define PGP_PACKET_TAG_PUBLIC_KEY 6 #define PGP_PACKET_TAG_PUBLIC_KEY 6
#define PGP_PACKET_TAG_USER_ID 13 #define PGP_PACKET_TAG_USER_ID 13
#define PGP_PACKET_TAG_SIGNATURE 2 #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) ; std::string radix_cert = pgp_certificate.substr(i,j-i) ;
#ifdef DEBUG_PGPUTIL
std::cerr << "extracted radix cert: " << std::endl; std::cerr << "extracted radix cert: " << std::endl;
std::cerr << radix_cert ; std::cerr << radix_cert ;
#endif
// 1 - Convert armored key into binary key // 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 ; unsigned char *data = (unsigned char *)keydata ;
#ifdef DEBUG_PGPUTIL
std::cerr << "Total size: " << len << std::endl; std::cerr << "Total size: " << len << std::endl;
#endif
uint8_t packet_tag; uint8_t packet_tag;
uint32_t packet_length ; uint32_t packet_length ;
@ -69,10 +77,11 @@ bool PGPKeyManagement::createMinimalKey(const std::string& pgp_certificate,std::
while(true) while(true)
{ {
PGPKeyParser::read_packetHeader(data,packet_tag,packet_length) ; PGPKeyParser::read_packetHeader(data,packet_tag,packet_length) ;
#ifdef DEBUG_PGPUTIL
std::cerr << "Header:" << std::endl; std::cerr << "Header:" << std::endl;
std::cerr << " Packet tag: " << (int)packet_tag << std::endl; std::cerr << " Packet tag: " << (int)packet_tag << std::endl;
std::cerr << " Packet length: " << packet_length << std::endl; std::cerr << " Packet length: " << packet_length << std::endl;
#endif
data += packet_length ; data += packet_length ;
@ -99,8 +108,10 @@ bool PGPKeyManagement::createMinimalKey(const std::string& pgp_certificate,std::
std::string crc_string ; std::string crc_string ;
Radix64::encode((const char *)tmp,3,crc_string) ; Radix64::encode((const char *)tmp,3,crc_string) ;
#ifdef DEBUG_PGPUTIL
std::cerr << "After signature pruning: " << std::endl; std::cerr << "After signature pruning: " << std::endl;
std::cerr << outstring << std::endl; std::cerr << outstring << std::endl;
#endif
cleaned_certificate = std::string(PGP_CERTIFICATE_START_STRING) + "\n" + version_string + "\n\n" ; 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) if(new_format)
{ {
#ifdef DEBUG_PGPUTIL
std::cerr << "Packet is in new format" << std::endl; std::cerr << "Packet is in new format" << std::endl;
#endif
packet_tag = b1 & 0x3f ; packet_tag = b1 & 0x3f ;
packet_length = read_125Size(data) ; packet_length = read_125Size(data) ;
} }
else else
{ {
#ifdef DEBUG_PGPUTIL
std::cerr << "Packet is in old format" << std::endl; std::cerr << "Packet is in old format" << std::endl;
#endif
uint8_t length_type = b1 & 0x03 ; uint8_t length_type = b1 & 0x03 ;
packet_tag = (b1 & 0x3c) >> 2 ; packet_tag = (b1 & 0x3c) >> 2 ;

View File

@ -121,14 +121,18 @@ static void updateItem(QTreeWidgetItem *item, ChatLobbyId id, const std::string
void ChatLobbyWidget::updateDisplay() void ChatLobbyWidget::updateDisplay()
{ {
#ifdef CHAT_LOBBY_GUI_DEBUG
std::cerr << "updating chat lobby display!" << std::endl; std::cerr << "updating chat lobby display!" << std::endl;
#endif
std::vector<PublicChatLobbyRecord> publicLobbies; std::vector<PublicChatLobbyRecord> publicLobbies;
rsMsgs->getListOfNearbyChatLobbies(publicLobbies); rsMsgs->getListOfNearbyChatLobbies(publicLobbies);
std::list<ChatLobbyInfo> lobbies; std::list<ChatLobbyInfo> lobbies;
rsMsgs->getChatLobbyList(lobbies); rsMsgs->getChatLobbyList(lobbies);
#ifdef CHAT_LOBBY_GUI_DEBUG
std::cerr << "got " << publicLobbies.size() << " public lobbies, and " << lobbies.size() << " private lobbies." << std::endl; std::cerr << "got " << publicLobbies.size() << " public lobbies, and " << lobbies.size() << " private lobbies." << std::endl;
#endif
// now, do a nice display of lobbies // now, do a nice display of lobbies

View File

@ -382,7 +382,9 @@ void NotifyQt::notifyListChange(int list, int type)
emit privateChatChanged(list, type); emit privateChatChanged(list, type);
break; break;
case NOTIFY_LIST_CHAT_LOBBY_LIST: case NOTIFY_LIST_CHAT_LOBBY_LIST:
#ifdef NOTIFY_DEBUG
std::cerr << "received notify chat lobby list" << std::endl; std::cerr << "received notify chat lobby list" << std::endl;
#endif
emit lobbyListChanged(); emit lobbyListChanged();
case NOTIFY_LIST_GROUPLIST: case NOTIFY_LIST_GROUPLIST: