- reverted part of r15609 since apparently the issue is purely limited to ZC_SKILLINFO_LIST, and this change breaks big storages

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15613 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
lordttseven 2012-02-19 10:21:16 +00:00
parent ca34ad2ba9
commit 27933caa3d
4 changed files with 5 additions and 8 deletions

View File

@ -8,13 +8,12 @@ debug: no
// How long can a socket stall before closing the connection (in seconds)
stall_time: 60
// Maximum allowed size for clients packets in bytes (default: 8192).
// Maximum allowed size for clients packets in bytes (default: 24576).
// NOTE: To reduce the size of reported packets, lower the values of defines, which
// have been customized, such as MAX_STORAGE, MAX_GUILD_STORAGE or MAX_CART.
// NOTE: Do not modify this setting, unless the client has been modified to support
// larger packets. The client will crash, when it receives larger packets,
// or worse, show undefined behavior.
socket_max_client_packet: 8192
// larger packets. The client will crash, when it receives larger packets.
socket_max_client_packet: 24576
//----- IP Rules Settings -----

View File

@ -219,8 +219,7 @@ int naddr_ = 0; // # of ip addresses
// Maximum packet size in bytes, which the client is able to handle.
// Larger packets cause a buffer overflow and stack corruption.
// TODO: This value is based on pure observation with newer clients. Replace with the actual buffer size if we ever get our hands on it.
size_t socket_max_client_packet = 8192;
static size_t socket_max_client_packet = 24576;
// initial recv buffer size (this will also be the max. size)
// biggest known packet: S 0153 <len>.w <emblem data>.?B -> 24x24 256 color .bmp (0153 + len.w + 1618/1654/1756 bytes)

View File

@ -94,7 +94,6 @@ struct socket_data
void* session_data; // stores application-specific data related to the session
};
extern size_t socket_max_client_packet;
// Data prototype declaration

View File

@ -4535,7 +4535,7 @@ void clif_skillinfoblock(struct map_session_data *sd)
if( (id = sd->status.skill[i].id) != 0 )
{
// workaround for bugreport:5348
if (len + 37 > socket_max_client_packet)
if (len + 37 > 8192)
break;
WFIFOW(fd,len) = id;