increase size of buffer for incoming proxy packets, since now that I

have 50+ saved network games requests for moves are that big.  (This
is a temporary fix.)
This commit is contained in:
Eric House 2013-01-26 18:48:57 -08:00
parent 8cb0a8a7a7
commit 7ecf57c556
2 changed files with 2 additions and 1 deletions

View file

@ -203,6 +203,7 @@ XWThreadPool::get_process_packet( SockType stype, const AddrInfo* addr )
short packetSize; short packetSize;
assert( sizeof(packetSize) == 2 ); assert( sizeof(packetSize) == 2 );
// Fix this to return an allocated buffer
unsigned char buf[MAX_MSG_LEN+1]; unsigned char buf[MAX_MSG_LEN+1];
int nRead = read_packet( addr->socket(), buf, sizeof(buf) ); int nRead = read_packet( addr->socket(), buf, sizeof(buf) );
if ( nRead < 0 ) { if ( nRead < 0 ) {

View file

@ -122,7 +122,7 @@ typedef unsigned char XWRELAY_Cmd;
#define HOST_ID_SERVER 1 #define HOST_ID_SERVER 1
#define MAX_INVITE_LEN 31 #define MAX_INVITE_LEN 31
#define MAX_MSG_LEN 1024 /* Used for proxy too! */ #define MAX_MSG_LEN 2048 /* Used for proxy too! */
#define MAX_CONNNAME_LEN 48 /* host ID, boot time, and seeds as hex? */ #define MAX_CONNNAME_LEN 48 /* host ID, boot time, and seeds as hex? */
#define MAX_DEVID_LEN 8 /* 32-bit number as hex */ #define MAX_DEVID_LEN 8 /* 32-bit number as hex */