From 0229ef1fe81135594d6daaeefe3e7d7f5779b236 Mon Sep 17 00:00:00 2001 From: drbob Date: Thu, 14 Jul 2011 15:01:41 +0000 Subject: [PATCH] Disabled UDP connections (in p3LinkMgr) for now. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4447 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/pqi/p3linkmgr.cc | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/libretroshare/src/pqi/p3linkmgr.cc b/libretroshare/src/pqi/p3linkmgr.cc index 62d03f224..e6c46b2d9 100644 --- a/libretroshare/src/pqi/p3linkmgr.cc +++ b/libretroshare/src/pqi/p3linkmgr.cc @@ -1282,11 +1282,32 @@ bool p3LinkMgrIMPL::tryConnectUDP(const std::string &id, struct sockaddr_in &r uint32_t flags, uint32_t delay, uint32_t bandwidth) { + +#define DISABLE_UDP_CONNECTIONS 1 +#ifdef DISABLE_UDP_CONNECTIONS + + std::cerr << "p3LinkMgrIMPL::tryConnectUDP() CONNECTIONS DISABLED FOR NOW... id: " << id << std::endl; + + std::cerr << "p3LinkMgrIMPL::tryConnectUDP() PARAMS id: " << id; + std::cerr << " raddr: " << rs_inet_ntoa(rUdpAddr.sin_addr) << ":" << ntohs(rUdpAddr.sin_port); + std::cerr << " proxyaddr: " << rs_inet_ntoa(proxyaddr.sin_addr) << ":" << ntohs(proxyaddr.sin_port); + std::cerr << " srcaddr: " << rs_inet_ntoa(srcaddr.sin_addr) << ":" << ntohs(srcaddr.sin_port); + std::cerr << " flags: " << flags; + std::cerr << " delay: " << delay; + std::cerr << " bandwidth: " << bandwidth; + std::cerr << std::endl; + + mNetMgr->netAssistStatusUpdate(id, NETMGR_DHT_FEEDBACK_CONN_FAILED); + + return false; +#endif + + RsStackMutex stack(mLinkMtx); /****** STACK LOCK MUTEX *******/ /* push all available addresses onto the connect addr stack */ #ifdef LINKMGR_DEBUG - std::cerr << "p3LinkMgrIMPL::retryConnectTCP() id: " << id << std::endl; + std::cerr << "p3LinkMgrIMPL::tryConnectUDP() id: " << id << std::endl; #endif if (id == getOwnId()) {