mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-12 16:09:37 -05:00
removed/improved debug info
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8409 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
91bf1d6cb2
commit
4a6b5dce8f
@ -106,8 +106,9 @@ void DistantChatService::flush()
|
||||
pendingDistantChatItems.push_back(cs) ;
|
||||
|
||||
it->second.last_keep_alive_sent = now ;
|
||||
|
||||
#ifdef DEBUG_DISTANT_CHAT
|
||||
std::cerr << "(II) DistantChatService:: Sending keep alive packet to gxs id " << it->first << std::endl;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -372,7 +373,9 @@ void DistantChatService::receiveTurtleData(RsTurtleGenericTunnelItem *gitem,cons
|
||||
}
|
||||
if(*((uint64_t*)item->data_bytes) != 0)
|
||||
{
|
||||
#ifdef DEBUG_DISTANT_CHAT
|
||||
std::cerr << " Item is encrypted." << std::endl;
|
||||
#endif
|
||||
|
||||
// if cannot decrypt, it means the key is wrong. We need to re-negociate a new key.
|
||||
|
||||
@ -380,7 +383,9 @@ void DistantChatService::receiveTurtleData(RsTurtleGenericTunnelItem *gitem,cons
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef DEBUG_DISTANT_CHAT
|
||||
std::cerr << " Item is not encrypted." << std::endl;
|
||||
#endif
|
||||
|
||||
// Now try deserialise the decrypted data to make an RsItem out of it.
|
||||
//
|
||||
|
@ -714,14 +714,16 @@ 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;
|
||||
}
|
||||
|
||||
if(!GxsSecurity::validateSignature((char*)data,data_size,signature_key,signature))
|
||||
{
|
||||
std::cerr << "(EE) Signature was verified and it doesn't check! This is a security issue!" << std::endl;
|
||||
std::cerr << "(SS) Signature was verified and it doesn't check! This is a security issue!" << std::endl;
|
||||
signing_error = RS_GIXS_ERROR_SIGNATURE_MISMATCH ;
|
||||
return false;
|
||||
}
|
||||
|
@ -172,8 +172,10 @@ bool sockaddr_storage_copyip(struct sockaddr_storage &dst, const struct sockaddr
|
||||
return sockaddr_storage_ipv6_copyip(dst, src);
|
||||
break;
|
||||
default:
|
||||
std::cerr << "sockaddr_storage_copyip() invalid addr.ss_family";
|
||||
std::cerr << std::endl;
|
||||
#ifdef SS_DEBUG
|
||||
std::cerr << "sockaddr_storage_copyip() invalid addr.ss_family";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
@ -220,8 +222,10 @@ bool sockaddr_storage_setport(struct sockaddr_storage &addr, uint16_t port)
|
||||
return sockaddr_storage_ipv6_setport(addr, port);
|
||||
break;
|
||||
default:
|
||||
std::cerr << "sockaddr_storage_setport() invalid addr.ss_family";
|
||||
std::cerr << std::endl;
|
||||
#ifdef SS_DEBUG
|
||||
std::cerr << "sockaddr_storage_setport() invalid addr.ss_family";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
@ -292,8 +296,10 @@ bool operator<(const struct sockaddr_storage &a, const struct sockaddr_storage &
|
||||
return sockaddr_storage_ipv6_lessthan(a, b);
|
||||
break;
|
||||
default:
|
||||
std::cerr << "sockaddr_storage_operator<() INVALID Family - error";
|
||||
std::cerr << std::endl;
|
||||
#ifdef SS_DEBUG
|
||||
std::cerr << "sockaddr_storage_operator<() INVALID Family - error";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
@ -319,8 +325,10 @@ bool sockaddr_storage_same(const struct sockaddr_storage &addr, const struct soc
|
||||
return sockaddr_storage_ipv6_same(addr, addr2);
|
||||
break;
|
||||
default:
|
||||
std::cerr << "sockaddr_storage_same() INVALID Family - error";
|
||||
std::cerr << std::endl;
|
||||
#ifdef SS_DEBUG
|
||||
std::cerr << "sockaddr_storage_same() INVALID Family - error";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
@ -356,8 +364,10 @@ bool sockaddr_storage_sameip(const struct sockaddr_storage &addr, const struct s
|
||||
return sockaddr_storage_ipv6_sameip(addr, addr2);
|
||||
break;
|
||||
default:
|
||||
std::cerr << "sockaddr_storage_sameip() INVALID Family - error";
|
||||
std::cerr << std::endl;
|
||||
#ifdef SS_DEBUG
|
||||
std::cerr << "sockaddr_storage_sameip() INVALID Family - error";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
@ -409,8 +419,10 @@ bool sockaddr_storage_samesubnet(const struct sockaddr_storage &addr, const stru
|
||||
return sockaddr_storage_ipv6_samesubnet(addr, addr2);
|
||||
break;
|
||||
default:
|
||||
std::cerr << "sockaddr_storage_samesubnet() INVALID Family - error";
|
||||
std::cerr << std::endl;
|
||||
#ifdef SS_DEBUG
|
||||
std::cerr << "sockaddr_storage_samesubnet() INVALID Family - error";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
@ -529,8 +541,10 @@ bool sockaddr_storage_isValidNet(const struct sockaddr_storage &addr)
|
||||
return sockaddr_storage_ipv6_isValidNet(addr);
|
||||
break;
|
||||
default:
|
||||
#ifdef SS_DEBUG
|
||||
std::cerr << "sockaddr_storage_isValidNet() INVALID Family - error: " << sockaddr_storage_iptostring(addr);
|
||||
std::cerr << std::endl;
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
@ -552,8 +566,10 @@ bool sockaddr_storage_isLoopbackNet(const struct sockaddr_storage &addr)
|
||||
return sockaddr_storage_ipv6_isLoopbackNet(addr);
|
||||
break;
|
||||
default:
|
||||
#ifdef SS_DEBUG
|
||||
std::cerr << "sockaddr_storage_isLoopbackNet() INVALID Family - error: " << sockaddr_storage_iptostring(addr);
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
@ -576,8 +592,10 @@ bool sockaddr_storage_isPrivateNet(const struct sockaddr_storage &addr)
|
||||
return sockaddr_storage_ipv6_isPrivateNet(addr);
|
||||
break;
|
||||
default:
|
||||
#ifdef SS_DEBUG
|
||||
std::cerr << "sockaddr_storage_isPrivateNet() INVALID Family - error: " << sockaddr_storage_iptostring(addr);
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
@ -600,8 +618,10 @@ bool sockaddr_storage_isExternalNet(const struct sockaddr_storage &addr)
|
||||
return sockaddr_storage_ipv6_isExternalNet(addr);
|
||||
break;
|
||||
default:
|
||||
std::cerr << "sockaddr_storage_isExternalNet() INVALID Family - error";
|
||||
std::cerr << std::endl;
|
||||
#ifdef SS_DEBUG
|
||||
std::cerr << "sockaddr_storage_isExternalNet() INVALID Family - error";
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user