- fix empty path PR: 247376 Submitted by: Alexey Dokuchaev Obtained from: Gentoo - fix mutiple peers behind same IP Obtained from: Timothy Palpant
12 lines
490 B
C++
12 lines
490 B
C++
--- peer.cpp.orig 2008-06-15 00:00:19 UTC
|
|
+++ peer.cpp
|
|
@@ -66,7 +66,8 @@ int btBasic::IpEquiv(struct sockaddr_in addr)
|
|
// CONSOLE.Debug_n("IpEquiv: %s <=> ", inet_ntoa(m_sin.sin_addr));
|
|
// CONSOLE.Debug_n("%s", inet_ntoa(addr.sin_addr));
|
|
// CONSOLE.Debug_n("");
|
|
- return (memcmp(&m_sin.sin_addr,&addr.sin_addr,sizeof(struct in_addr)) == 0) ?
|
|
+ return ((memcmp(&m_sin.sin_addr,&addr.sin_addr,sizeof(struct in_addr)) == 0)
|
|
+ && m_sin.sin_port == addr.sin_port) ?
|
|
1 : 0;
|
|
}
|
|
|