mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-26 07:16:11 -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 ***/
|
||||
}
|
||||
|
||||
/* as determined by uPnP */
|
||||
bool upnphandler::getInternalAddress(struct sockaddr_storage &addr)
|
||||
/* as determined by uPnP */
|
||||
bool upnphandler::getInternalAddress(struct sockaddr_storage &addr)
|
||||
{
|
||||
// std::cerr << "UPnPHandler::getInternalAddress() pre Lock!" << std::endl;
|
||||
dataMtx.lock(); /*** LOCK MUTEX ***/
|
||||
// std::cerr << "UPnPHandler::getInternalAddress() postLock!" << std::endl;
|
||||
|
||||
std::cerr << "UPnPHandler::getInternalAddress()" << std::endl;
|
||||
RS_STACK_MUTEX(dataMtx);
|
||||
|
||||
// copy to universal addr.
|
||||
sockaddr_storage_clear(addr);
|
||||
@ -657,18 +653,15 @@ bool upnphandler::getInternalAddress(struct sockaddr_storage &addr)
|
||||
|
||||
bool valid = (upnpState >= RS_UPNP_S_ACTIVE);
|
||||
|
||||
dataMtx.unlock(); /*** UNLOCK MUTEX ***/
|
||||
Dbg2() << __PRETTY_FUNCTION__ << " valid: " << valid
|
||||
<< " addr: " << addr << std::endl;
|
||||
|
||||
return valid;
|
||||
}
|
||||
|
||||
bool upnphandler::getExternalAddress(struct sockaddr_storage &addr)
|
||||
bool upnphandler::getExternalAddress(sockaddr_storage &addr)
|
||||
{
|
||||
// std::cerr << "UPnPHandler::getExternalAddress() pre Lock!" << std::endl;
|
||||
dataMtx.lock(); /*** LOCK MUTEX ***/
|
||||
// std::cerr << "UPnPHandler::getExternalAddress() postLock!" << std::endl;
|
||||
|
||||
std::cerr << "UPnPHandler::getExternalAddress()" << std::endl;
|
||||
RS_STACK_MUTEX(dataMtx);
|
||||
|
||||
// copy to universal addr.
|
||||
sockaddr_storage_clear(addr);
|
||||
@ -676,7 +669,8 @@ bool upnphandler::getExternalAddress(struct sockaddr_storage &addr)
|
||||
|
||||
bool valid = (upnpState == RS_UPNP_S_ACTIVE);
|
||||
|
||||
dataMtx.unlock(); /*** UNLOCK MUTEX ***/
|
||||
Dbg2() << __PRETTY_FUNCTION__ << " valid: " << valid
|
||||
<< " addr: " << addr << std::endl;
|
||||
|
||||
return valid;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
/* platform independent networking... */
|
||||
#include "pqi/pqinetwork.h"
|
||||
#include "pqi/pqiassist.h"
|
||||
|
||||
#include "util/rsdebug.h"
|
||||
#include "util/rsthreads.h"
|
||||
|
||||
class upnpentry
|
||||
@ -97,7 +97,7 @@ bool shutdown_upnp();
|
||||
bool initUPnPState();
|
||||
bool printUPnPState();
|
||||
|
||||
private:
|
||||
private:
|
||||
|
||||
bool background_setup_upnp(bool, bool);
|
||||
bool checkUPnPActive();
|
||||
@ -123,4 +123,5 @@ bool checkUPnPActive();
|
||||
/* active port forwarding */
|
||||
std::list<upnpforward> activeForwards;
|
||||
|
||||
RS_SET_CONTEXT_DEBUG_LEVEL(1)
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user