mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-04 23:25:32 -04:00
Removed p3ConnectMgr. Replaced it with p3LinkMgr, p3NetMgr and p3PeerMgr.
Updated references in other classes. * Most classes need p3LinkMgr, and only use two functions: OwnId() and getOnlineList() git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4416 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
21487bfdf6
commit
f6f721a492
55 changed files with 1226 additions and 1044 deletions
|
@ -42,6 +42,8 @@
|
|||
|
||||
#include "pqi/pqissllistener.h"
|
||||
|
||||
#include "pqi/p3linkmgr.h"
|
||||
|
||||
const int pqisslzone = 37714;
|
||||
|
||||
/*********
|
||||
|
@ -92,7 +94,7 @@ static const int PQISSL_SSL_CONNECT_TIMEOUT = 30;
|
|||
*
|
||||
*/
|
||||
|
||||
pqissl::pqissl(pqissllistener *l, PQInterface *parent, p3ConnectMgr *cm)
|
||||
pqissl::pqissl(pqissllistener *l, PQInterface *parent, p3LinkMgr *lm)
|
||||
:NetBinInterface(parent, parent->PeerId()),
|
||||
waiting(WAITING_NOT), active(false), certvalid(false),
|
||||
sslmode(PQISSL_ACTIVE), ssl_connection(NULL), sockfd(-1),
|
||||
|
@ -102,7 +104,7 @@ pqissl::pqissl(pqissllistener *l, PQInterface *parent, p3ConnectMgr *cm)
|
|||
net_attempt(0), net_failure(0), net_unreachable(0),
|
||||
sameLAN(false), n_read_zero(0), mReadZeroTS(0),
|
||||
mConnectDelay(0), mConnectTS(0),
|
||||
mConnectTimeout(0), mTimeoutTS(0), mConnMgr(cm)
|
||||
mConnectTimeout(0), mTimeoutTS(0), mLinkMgr(lm)
|
||||
|
||||
{
|
||||
/* set address to zero */
|
||||
|
@ -1307,9 +1309,8 @@ int pqissl::accept(SSL *ssl, int fd, struct sockaddr_in foreign_addr) // initiat
|
|||
|
||||
/* check whether it is on the same LAN */
|
||||
|
||||
peerConnectState details;
|
||||
mConnMgr->getOwnNetStatus(details);
|
||||
sameLAN = isSameSubnet(&(remote_addr.sin_addr), &(details.currentlocaladdr.sin_addr));
|
||||
struct sockaddr_in localaddr = mLinkMgr->getLocalAddress();
|
||||
sameLAN = isSameSubnet(&(remote_addr.sin_addr), &(localaddr.sin_addr));
|
||||
|
||||
{
|
||||
std::ostringstream out;
|
||||
|
@ -1317,7 +1318,7 @@ int pqissl::accept(SSL *ssl, int fd, struct sockaddr_in foreign_addr) // initiat
|
|||
out << std::endl;
|
||||
out << "\t\tchecking for same LAN";
|
||||
out << std::endl;
|
||||
out << "\t localaddr: " << rs_inet_ntoa(details.currentlocaladdr.sin_addr);
|
||||
out << "\t localaddr: " << rs_inet_ntoa(localaddr.sin_addr);
|
||||
out << std::endl;
|
||||
out << "\t remoteaddr: " << rs_inet_ntoa(remote_addr.sin_addr);
|
||||
out << std::endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue