Calm down p3netmgr at least when internet connection is not available

Solve compiler warnings, delete tons of cruft and deadcode
This commit is contained in:
Gioacchino Mazzurco 2019-09-29 17:59:32 +02:00
parent 6788ea041a
commit 6b71c57a54
No known key found for this signature in database
GPG key ID: A1FBCA3872E87051
16 changed files with 120 additions and 2288 deletions

View file

@ -44,13 +44,10 @@ class DNSResolver ;
class pqiNetStatus
struct pqiNetStatus
{
public:
pqiNetStatus();
bool mLocalAddrOk; // Local address is not loopback.
bool mExtAddrOk; // have external address.
bool mExtAddrStableOk; // stable external address.
bool mUpnpOk; // upnp is ok.
@ -65,11 +62,6 @@ class pqiNetStatus
bool mResetReq; // Not Used yet!.
void print(std::ostream &out);
bool NetOk() // minimum to believe network is okay.`
{
return (mLocalAddrOk && mExtAddrOk);
}
};
class p3PeerMgr;
@ -211,11 +203,6 @@ void addNetListener(pqiNetListener *listener);
// SHOULD MAKE THIS PROTECTED.
bool checkNetAddress(); /* check our address is sensible */
protected:
void slowTick();
protected:
/****************** Internal Interface *******************/
bool enableNetAssistFirewall(bool on);
@ -248,7 +235,7 @@ bool netAssistAttach(bool on);
void netReset();
void statusTick();
void netTick();
void netStatusTick();
void netStartup();
/* startup the bits */
@ -335,7 +322,7 @@ void netStatusReset_locked();
// Improved NetStatusBox, which uses the Stunners!
pqiNetStateBox mNetStateBox;
rstime_t mLastSlowTickTime;
rstime_t mDoNotNetCheckUntilTs;
uint32_t mOldNatType;
uint32_t mOldNatHole;