aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMachiavelli <machiavelli.trinity@gmail.com>2011-08-02 01:55:18 +0200
committerMachiavelli <machiavelli.trinity@gmail.com>2011-08-02 01:55:18 +0200
commitcb5ba6b3c99919acd964bc86caaff0aa47e1ea9a (patch)
treefeb333d964ed05b3581eae2584a157a88e99382b /src
parentfc52f0846edd8b992b325da06b4a10f89ac62db6 (diff)
Core/RA: Fix RA subnegotiation for clients that don't send any subnegotiation data (like telnet) by setting a 1 second time window in which the client can send their packet before the RASocket will begin actual authentication.
Closes #2471
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/worldserver/RemoteAccess/RASocket.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/server/worldserver/RemoteAccess/RASocket.cpp b/src/server/worldserver/RemoteAccess/RASocket.cpp
index c813c2497f1..3268428d5de 100755
--- a/src/server/worldserver/RemoteAccess/RASocket.cpp
+++ b/src/server/worldserver/RemoteAccess/RASocket.cpp
@@ -276,8 +276,9 @@ int RASocket::subnegotiate()
const size_t recv_size = message_block.space();
+ // Wait a maximum of 1000ms for negotiation packet - not all telnet clients may send it
const ssize_t n = peer().recv(message_block.wr_ptr(),
- recv_size);
+ recv_size, &ACE_Time_Value(1));
if (n <= 0)
return int(n);
@@ -331,11 +332,8 @@ int RASocket::subnegotiate()
int RASocket::svc(void)
{
- if (subnegotiate() == -1)
- {
- sLog->outRemote("Subnegotiation failed!");
- return -1;
- }
+ //! Subnegotiation may differ per client - do not react on it
+ subnegotiate();
if (send("Authentication required\r\n") == -1)
return -1;