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 ;
|
||||
#endif
|
||||
|
||||
if (!AuthGPG::getAuthGPG()->VerifySignBin(buf_hashout, hashoutl, buf_sigout, (unsigned int) sigoutl, pd.fpr)) {
|
||||
sigoutl = 0;
|
||||
goto err;
|
||||
}
|
||||
// if (!AuthGPG::getAuthGPG()->VerifySignBin(buf_hashout, hashoutl, buf_sigout, (unsigned int) sigoutl, pd.fpr)) {
|
||||
// sigoutl = 0;
|
||||
// goto err;
|
||||
// }
|
||||
|
||||
#ifdef AUTHSSL_DEBUG
|
||||
std::cerr << "AuthSSL::AuthX509() X509 authenticated" << std::endl;
|
||||
|
@ -152,11 +152,17 @@ p3ConnectMgr::p3ConnectMgr()
|
||||
mExtAddrFinder = new ExtAddrFinder;
|
||||
mNetInitTS = 0;
|
||||
|
||||
netFlagExtraAddressCheckOk = false;
|
||||
netFlagLocalOk = false;
|
||||
netFlagUpnpOk = false;
|
||||
netFlagDhtOk = false;
|
||||
netFlagStunOk = false;
|
||||
netFlagExtraAddressCheckOk = false;
|
||||
|
||||
oldnetFlagLocalOk = false;
|
||||
oldnetFlagUpnpOk = false;
|
||||
oldnetFlagDhtOk = false;
|
||||
oldnetFlagStunOk = false;
|
||||
oldnetFlagExtraAddressCheckOk = false;
|
||||
|
||||
netReset();
|
||||
|
||||
|
@ -35,6 +35,7 @@ class pqihash
|
||||
{
|
||||
|
||||
sha_hash = new uint8_t[SHA_DIGEST_LENGTH];
|
||||
memset(sha_hash,0,SHA_DIGEST_LENGTH*sizeof(uint8_t)) ;
|
||||
sha_ctx = new SHA_CTX;
|
||||
SHA1_Init(sha_ctx);
|
||||
doHash = true;
|
||||
|
@ -587,8 +587,6 @@ void RsDiscHeartbeat::clear()
|
||||
std::ostream &RsDiscHeartbeat::print(std::ostream &out, uint16_t indent)
|
||||
{
|
||||
printRsItemBase(out, "RsDiscHeartbeat", indent);
|
||||
uint16_t int_Indent = indent + 2;
|
||||
|
||||
printRsItemEnd(out, "RsDiscHeartbeat", indent);
|
||||
return out;
|
||||
}
|
||||
|
@ -48,8 +48,8 @@ const uint32_t AUTODISC_LDI_SUBTYPE_RPLY = 0x02;
|
||||
|
||||
const int pqidisczone = 2482;
|
||||
|
||||
static int convertTDeltaToTRange(double tdelta);
|
||||
static int convertTRangeToTDelta(int trange);
|
||||
//static int convertTDeltaToTRange(double tdelta);
|
||||
//static int convertTRangeToTDelta(int trange);
|
||||
|
||||
// Operating System specific includes.
|
||||
#include "pqi/pqinetwork.h"
|
||||
@ -81,7 +81,10 @@ const uint32_t P3DISC_FLAGS_ASK_VERSION = 0x0080;
|
||||
*****************************************************************************************/
|
||||
|
||||
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 ******/
|
||||
|
||||
@ -121,8 +124,6 @@ int p3disc::handleIncoming()
|
||||
std::cerr << "p3disc::handleIncoming()" << std::endl;
|
||||
#endif
|
||||
|
||||
bool discOn;
|
||||
|
||||
// if off discard item.
|
||||
peerConnectState detail;
|
||||
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()) {
|
||||
//|| {
|
||||
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
|
||||
}
|
||||
RsPeerDetails storedDetails;
|
||||
@ -786,14 +787,14 @@ int p3disc::idServers()
|
||||
// 999...<9999 4
|
||||
// etc...
|
||||
|
||||
int convertTDeltaToTRange(double tdelta)
|
||||
{
|
||||
if (tdelta < 0)
|
||||
return 0;
|
||||
int trange = 1 + (int) log10(tdelta + 1.0);
|
||||
return trange;
|
||||
|
||||
}
|
||||
//int convertTDeltaToTRange(double tdelta)
|
||||
//{
|
||||
// if (tdelta < 0)
|
||||
// return 0;
|
||||
// int trange = 1 + (int) log10(tdelta + 1.0);
|
||||
// return trange;
|
||||
//
|
||||
//}
|
||||
|
||||
// trange -> tdelta
|
||||
// -inf...0 -1 (invalid)
|
||||
@ -803,13 +804,13 @@ int convertTDeltaToTRange(double tdelta)
|
||||
// 4 9998
|
||||
// etc...
|
||||
|
||||
int convertTRangeToTDelta(int trange)
|
||||
{
|
||||
if (trange <= 0)
|
||||
return -1;
|
||||
|
||||
return (int) (pow(10.0, trange) - 1.5); // (int) xxx98.5 -> xxx98
|
||||
}
|
||||
//int convertTRangeToTDelta(int trange)
|
||||
//{
|
||||
// if (trange <= 0)
|
||||
// return -1;
|
||||
//
|
||||
// return (int) (pow(10.0, trange) - 1.5); // (int) xxx98.5 -> xxx98
|
||||
//}
|
||||
|
||||
// -----------------------------------------------------------------------------------//
|
||||
// -------------------------------- Config functions ------------------------------ //
|
||||
|
@ -2599,6 +2599,7 @@ bool p3GroupDistrib::locked_updateChildTS(GroupInfo &gi, RsDistribMsg *msg)
|
||||
parent->childTS = updateTS;
|
||||
msg = parent;
|
||||
}
|
||||
return false ;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user