Make test cases ipv4 compatible (they were ipv6 only...)
This commit is contained in:
@@ -66,6 +66,7 @@
|
||||
#define SERVER_SESSION_ACTIVITY_TIMEOUT_SEC 1800 // 30 min, MUST be > SERVER_TIMEOUT_WARNING_REMAINING_SEC
|
||||
#define SERVER_SESSION_FORCED_TIMEOUT_SEC 86400 // 1 day, should be quite large.
|
||||
|
||||
#define SERVER_ADDRESS_LOCALHOST_STR_V4 "::ffff:127.0.0.1"
|
||||
#define SERVER_ADDRESS_LOCALHOST_STR "::1"
|
||||
|
||||
#define SERVER_STATISTICS_FILE_NAME "server_statistics.log"
|
||||
@@ -1425,6 +1426,7 @@ ServerLobbyThread::HandleNetPacketJoinGame(SessionWrapper session, const std::st
|
||||
}
|
||||
else if (tmpData.gameType == GAME_TYPE_RANKING
|
||||
&& session.sessionData->GetClientAddr() != SERVER_ADDRESS_LOCALHOST_STR
|
||||
&& session.sessionData->GetClientAddr() != SERVER_ADDRESS_LOCALHOST_STR_V4
|
||||
&& game.IsClientAddressConnected(session.sessionData->GetClientAddr()))
|
||||
{
|
||||
SendJoinGameFailed(session.sessionData, joinGame.gameId, NTF_NET_JOIN_IP_BLOCKED);
|
||||
|
||||
@@ -130,7 +130,7 @@ public class RunRankingGameTest extends TestBase {
|
||||
Socket s[] = new Socket[9];
|
||||
long playerId[] = new long[9];
|
||||
for (int i = 0; i < 9; i++) {
|
||||
s[i] = new Socket("::1", 7234);
|
||||
s[i] = new Socket("localhost", 7234);
|
||||
String username = "test" + (i+1);
|
||||
String password = username;
|
||||
playerId[i] = userInit(s[i], username, password);
|
||||
|
||||
@@ -54,7 +54,7 @@ public abstract class TestBase {
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
Thread.sleep(2000);
|
||||
sock = new Socket("::1", 7234);
|
||||
sock = new Socket("localhost", 7234);
|
||||
encoder = CoderFactory.getInstance().newEncoder("BER");
|
||||
decoder = CoderFactory.getInstance().newDecoder("BER");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user