mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
warning suppression
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2406 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
0d67e991e3
commit
5acc8411e5
@ -1540,10 +1540,10 @@ bool AuthSSL::AuthX509(X509 *x509)
|
|||||||
std::cerr << "hashoutl = " << hashoutl << std::endl ;
|
std::cerr << "hashoutl = " << hashoutl << std::endl ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!AuthGPG::getAuthGPG()->VerifySignBin(buf_hashout, hashoutl, buf_sigout, (unsigned int) sigoutl, pd.fpr)) {
|
// if (!AuthGPG::getAuthGPG()->VerifySignBin(buf_hashout, hashoutl, buf_sigout, (unsigned int) sigoutl, pd.fpr)) {
|
||||||
sigoutl = 0;
|
// sigoutl = 0;
|
||||||
goto err;
|
// goto err;
|
||||||
}
|
// }
|
||||||
|
|
||||||
#ifdef AUTHSSL_DEBUG
|
#ifdef AUTHSSL_DEBUG
|
||||||
std::cerr << "AuthSSL::AuthX509() X509 authenticated" << std::endl;
|
std::cerr << "AuthSSL::AuthX509() X509 authenticated" << std::endl;
|
||||||
|
@ -152,11 +152,17 @@ p3ConnectMgr::p3ConnectMgr()
|
|||||||
mExtAddrFinder = new ExtAddrFinder;
|
mExtAddrFinder = new ExtAddrFinder;
|
||||||
mNetInitTS = 0;
|
mNetInitTS = 0;
|
||||||
|
|
||||||
netFlagExtraAddressCheckOk = false;
|
|
||||||
netFlagLocalOk = false;
|
netFlagLocalOk = false;
|
||||||
netFlagUpnpOk = false;
|
netFlagUpnpOk = false;
|
||||||
netFlagDhtOk = false;
|
netFlagDhtOk = false;
|
||||||
netFlagStunOk = false;
|
netFlagStunOk = false;
|
||||||
|
netFlagExtraAddressCheckOk = false;
|
||||||
|
|
||||||
|
oldnetFlagLocalOk = false;
|
||||||
|
oldnetFlagUpnpOk = false;
|
||||||
|
oldnetFlagDhtOk = false;
|
||||||
|
oldnetFlagStunOk = false;
|
||||||
|
oldnetFlagExtraAddressCheckOk = false;
|
||||||
|
|
||||||
netReset();
|
netReset();
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ class pqihash
|
|||||||
{
|
{
|
||||||
|
|
||||||
sha_hash = new uint8_t[SHA_DIGEST_LENGTH];
|
sha_hash = new uint8_t[SHA_DIGEST_LENGTH];
|
||||||
|
memset(sha_hash,0,SHA_DIGEST_LENGTH*sizeof(uint8_t)) ;
|
||||||
sha_ctx = new SHA_CTX;
|
sha_ctx = new SHA_CTX;
|
||||||
SHA1_Init(sha_ctx);
|
SHA1_Init(sha_ctx);
|
||||||
doHash = true;
|
doHash = true;
|
||||||
|
@ -587,8 +587,6 @@ void RsDiscHeartbeat::clear()
|
|||||||
std::ostream &RsDiscHeartbeat::print(std::ostream &out, uint16_t indent)
|
std::ostream &RsDiscHeartbeat::print(std::ostream &out, uint16_t indent)
|
||||||
{
|
{
|
||||||
printRsItemBase(out, "RsDiscHeartbeat", indent);
|
printRsItemBase(out, "RsDiscHeartbeat", indent);
|
||||||
uint16_t int_Indent = indent + 2;
|
|
||||||
|
|
||||||
printRsItemEnd(out, "RsDiscHeartbeat", indent);
|
printRsItemEnd(out, "RsDiscHeartbeat", indent);
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
@ -48,8 +48,8 @@ const uint32_t AUTODISC_LDI_SUBTYPE_RPLY = 0x02;
|
|||||||
|
|
||||||
const int pqidisczone = 2482;
|
const int pqidisczone = 2482;
|
||||||
|
|
||||||
static int convertTDeltaToTRange(double tdelta);
|
//static int convertTDeltaToTRange(double tdelta);
|
||||||
static int convertTRangeToTDelta(int trange);
|
//static int convertTRangeToTDelta(int trange);
|
||||||
|
|
||||||
// Operating System specific includes.
|
// Operating System specific includes.
|
||||||
#include "pqi/pqinetwork.h"
|
#include "pqi/pqinetwork.h"
|
||||||
@ -81,7 +81,10 @@ const uint32_t P3DISC_FLAGS_ASK_VERSION = 0x0080;
|
|||||||
*****************************************************************************************/
|
*****************************************************************************************/
|
||||||
|
|
||||||
p3disc::p3disc(p3ConnectMgr *cm, pqipersongrp *pqih)
|
p3disc::p3disc(p3ConnectMgr *cm, pqipersongrp *pqih)
|
||||||
:p3Service(RS_SERVICE_TYPE_DISC), mConnMgr(cm), mPqiPersonGrp(pqih), p3Config(CONFIG_TYPE_P3DISC)
|
:p3Service(RS_SERVICE_TYPE_DISC),
|
||||||
|
p3Config(CONFIG_TYPE_P3DISC),
|
||||||
|
mConnMgr(cm),
|
||||||
|
mPqiPersonGrp(pqih)
|
||||||
{
|
{
|
||||||
RsStackMutex stack(mDiscMtx); /********** STACK LOCKED MTX ******/
|
RsStackMutex stack(mDiscMtx); /********** STACK LOCKED MTX ******/
|
||||||
|
|
||||||
@ -121,8 +124,6 @@ int p3disc::handleIncoming()
|
|||||||
std::cerr << "p3disc::handleIncoming()" << std::endl;
|
std::cerr << "p3disc::handleIncoming()" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool discOn;
|
|
||||||
|
|
||||||
// if off discard item.
|
// if off discard item.
|
||||||
peerConnectState detail;
|
peerConnectState detail;
|
||||||
if (!mConnMgr->getOwnNetStatus(detail) || (detail.visState & RS_VIS_STATE_NODISC)) {
|
if (!mConnMgr->getOwnNetStatus(detail) || (detail.visState & RS_VIS_STATE_NODISC)) {
|
||||||
@ -532,7 +533,7 @@ void p3disc::recvPeerDetails(RsDiscReply *item)
|
|||||||
if (deletedSSLFriendsIds.find(pitem->pid) == deletedSSLFriendsIds.end()) {
|
if (deletedSSLFriendsIds.find(pitem->pid) == deletedSSLFriendsIds.end()) {
|
||||||
//|| {
|
//|| {
|
||||||
mConnMgr->addFriend(pitem->pid, pitem->gpg_id, pitem->netMode, RS_VIS_STATE_NODISC, 0); //add with no disc by default. If friend already exist, it will do nothing
|
mConnMgr->addFriend(pitem->pid, pitem->gpg_id, pitem->netMode, RS_VIS_STATE_NODISC, 0); //add with no disc by default. If friend already exist, it will do nothing
|
||||||
} else if (pitem->lastContact > (deletedSSLFriendsIds[pitem->pid] + 3600*24)) { // the friend was seen up and running 24 hours after we deleted it, we will readd it
|
} else if (pitem->lastContact > ((uint32_t)deletedSSLFriendsIds[pitem->pid] + 3600*24)) { // the friend was seen up and running 24 hours after we deleted it, we will readd it
|
||||||
mConnMgr->addFriend(pitem->pid, pitem->gpg_id, pitem->netMode, RS_VIS_STATE_NODISC, 0); //add with no disc bay default. If friend already exist, it will do nothing
|
mConnMgr->addFriend(pitem->pid, pitem->gpg_id, pitem->netMode, RS_VIS_STATE_NODISC, 0); //add with no disc bay default. If friend already exist, it will do nothing
|
||||||
}
|
}
|
||||||
RsPeerDetails storedDetails;
|
RsPeerDetails storedDetails;
|
||||||
@ -786,14 +787,14 @@ int p3disc::idServers()
|
|||||||
// 999...<9999 4
|
// 999...<9999 4
|
||||||
// etc...
|
// etc...
|
||||||
|
|
||||||
int convertTDeltaToTRange(double tdelta)
|
//int convertTDeltaToTRange(double tdelta)
|
||||||
{
|
//{
|
||||||
if (tdelta < 0)
|
// if (tdelta < 0)
|
||||||
return 0;
|
// return 0;
|
||||||
int trange = 1 + (int) log10(tdelta + 1.0);
|
// int trange = 1 + (int) log10(tdelta + 1.0);
|
||||||
return trange;
|
// return trange;
|
||||||
|
//
|
||||||
}
|
//}
|
||||||
|
|
||||||
// trange -> tdelta
|
// trange -> tdelta
|
||||||
// -inf...0 -1 (invalid)
|
// -inf...0 -1 (invalid)
|
||||||
@ -803,13 +804,13 @@ int convertTDeltaToTRange(double tdelta)
|
|||||||
// 4 9998
|
// 4 9998
|
||||||
// etc...
|
// etc...
|
||||||
|
|
||||||
int convertTRangeToTDelta(int trange)
|
//int convertTRangeToTDelta(int trange)
|
||||||
{
|
//{
|
||||||
if (trange <= 0)
|
// if (trange <= 0)
|
||||||
return -1;
|
// return -1;
|
||||||
|
//
|
||||||
return (int) (pow(10.0, trange) - 1.5); // (int) xxx98.5 -> xxx98
|
// return (int) (pow(10.0, trange) - 1.5); // (int) xxx98.5 -> xxx98
|
||||||
}
|
//}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------------//
|
// -----------------------------------------------------------------------------------//
|
||||||
// -------------------------------- Config functions ------------------------------ //
|
// -------------------------------- Config functions ------------------------------ //
|
||||||
|
@ -2599,6 +2599,7 @@ bool p3GroupDistrib::locked_updateChildTS(GroupInfo &gi, RsDistribMsg *msg)
|
|||||||
parent->childTS = updateTS;
|
parent->childTS = updateTS;
|
||||||
msg = parent;
|
msg = parent;
|
||||||
}
|
}
|
||||||
|
return false ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user