mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-26 23:36:59 -05:00
Silence excessive debugging in miniupnp handler
This commit is contained in:
parent
8a2508109a
commit
57be2cb11e
@ -642,14 +642,10 @@ void upnphandler::setExternalPort(unsigned short eport_in)
|
|||||||
dataMtx.unlock(); /*** UNLOCK MUTEX ***/
|
dataMtx.unlock(); /*** UNLOCK MUTEX ***/
|
||||||
}
|
}
|
||||||
|
|
||||||
/* as determined by uPnP */
|
/* as determined by uPnP */
|
||||||
bool upnphandler::getInternalAddress(struct sockaddr_storage &addr)
|
bool upnphandler::getInternalAddress(struct sockaddr_storage &addr)
|
||||||
{
|
{
|
||||||
// std::cerr << "UPnPHandler::getInternalAddress() pre Lock!" << std::endl;
|
RS_STACK_MUTEX(dataMtx);
|
||||||
dataMtx.lock(); /*** LOCK MUTEX ***/
|
|
||||||
// std::cerr << "UPnPHandler::getInternalAddress() postLock!" << std::endl;
|
|
||||||
|
|
||||||
std::cerr << "UPnPHandler::getInternalAddress()" << std::endl;
|
|
||||||
|
|
||||||
// copy to universal addr.
|
// copy to universal addr.
|
||||||
sockaddr_storage_clear(addr);
|
sockaddr_storage_clear(addr);
|
||||||
@ -657,18 +653,15 @@ bool upnphandler::getInternalAddress(struct sockaddr_storage &addr)
|
|||||||
|
|
||||||
bool valid = (upnpState >= RS_UPNP_S_ACTIVE);
|
bool valid = (upnpState >= RS_UPNP_S_ACTIVE);
|
||||||
|
|
||||||
dataMtx.unlock(); /*** UNLOCK MUTEX ***/
|
Dbg2() << __PRETTY_FUNCTION__ << " valid: " << valid
|
||||||
|
<< " addr: " << addr << std::endl;
|
||||||
|
|
||||||
return valid;
|
return valid;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool upnphandler::getExternalAddress(struct sockaddr_storage &addr)
|
bool upnphandler::getExternalAddress(sockaddr_storage &addr)
|
||||||
{
|
{
|
||||||
// std::cerr << "UPnPHandler::getExternalAddress() pre Lock!" << std::endl;
|
RS_STACK_MUTEX(dataMtx);
|
||||||
dataMtx.lock(); /*** LOCK MUTEX ***/
|
|
||||||
// std::cerr << "UPnPHandler::getExternalAddress() postLock!" << std::endl;
|
|
||||||
|
|
||||||
std::cerr << "UPnPHandler::getExternalAddress()" << std::endl;
|
|
||||||
|
|
||||||
// copy to universal addr.
|
// copy to universal addr.
|
||||||
sockaddr_storage_clear(addr);
|
sockaddr_storage_clear(addr);
|
||||||
@ -676,7 +669,8 @@ bool upnphandler::getExternalAddress(struct sockaddr_storage &addr)
|
|||||||
|
|
||||||
bool valid = (upnpState == RS_UPNP_S_ACTIVE);
|
bool valid = (upnpState == RS_UPNP_S_ACTIVE);
|
||||||
|
|
||||||
dataMtx.unlock(); /*** UNLOCK MUTEX ***/
|
Dbg2() << __PRETTY_FUNCTION__ << " valid: " << valid
|
||||||
|
<< " addr: " << addr << std::endl;
|
||||||
|
|
||||||
return valid;
|
return valid;
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
/* platform independent networking... */
|
/* platform independent networking... */
|
||||||
#include "pqi/pqinetwork.h"
|
#include "pqi/pqinetwork.h"
|
||||||
#include "pqi/pqiassist.h"
|
#include "pqi/pqiassist.h"
|
||||||
|
#include "util/rsdebug.h"
|
||||||
#include "util/rsthreads.h"
|
#include "util/rsthreads.h"
|
||||||
|
|
||||||
class upnpentry
|
class upnpentry
|
||||||
@ -97,7 +97,7 @@ bool shutdown_upnp();
|
|||||||
bool initUPnPState();
|
bool initUPnPState();
|
||||||
bool printUPnPState();
|
bool printUPnPState();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
bool background_setup_upnp(bool, bool);
|
bool background_setup_upnp(bool, bool);
|
||||||
bool checkUPnPActive();
|
bool checkUPnPActive();
|
||||||
@ -123,4 +123,5 @@ bool checkUPnPActive();
|
|||||||
/* active port forwarding */
|
/* active port forwarding */
|
||||||
std::list<upnpforward> activeForwards;
|
std::list<upnpforward> activeForwards;
|
||||||
|
|
||||||
|
RS_SET_CONTEXT_DEBUG_LEVEL(1)
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user