diff options
author | rubidium <rubidium@openttd.org> | 2010-02-09 23:49:19 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-02-09 23:49:19 +0000 |
commit | ab35d95b5af18dc31484281f44dd1c2cafb72390 (patch) | |
tree | 9d2396483adc97fa4375ccf6516ef78d069780eb /src/network/network_internal.h | |
parent | 3c9c2f704fc9936d3c979787043493770e1fb22b (diff) | |
download | openttd-ab35d95b5af18dc31484281f44dd1c2cafb72390.tar.xz |
(svn r19072) -Fix [FS#3599]: possible read/write after free when the client triggered the server to close the connection
Diffstat (limited to 'src/network/network_internal.h')
-rw-r--r-- | src/network/network_internal.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/network/network_internal.h b/src/network/network_internal.h index 0d6814b60..bb681bc06 100644 --- a/src/network/network_internal.h +++ b/src/network/network_internal.h @@ -153,7 +153,7 @@ void NetworkExecuteLocalCommandQueue(); void NetworkFreeLocalCommandQueue(); /* from network.c */ -void NetworkCloseClient(NetworkClientSocket *cs, bool error); +NetworkRecvStatus NetworkCloseClient(NetworkClientSocket *cs, NetworkRecvStatus status); void NetworkTextMessage(NetworkAction action, ConsoleColour colour, bool self_send, const char *name, const char *str = "", int64 data = 0); void NetworkGetClientName(char *clientname, size_t size, const NetworkClientSocket *cs); uint NetworkCalculateLag(const NetworkClientSocket *cs); @@ -164,11 +164,11 @@ bool NetworkFindName(char new_name[NETWORK_CLIENT_NAME_LENGTH]); /* Macros to make life a bit more easier */ #define DEF_CLIENT_RECEIVE_COMMAND(type) NetworkRecvStatus NetworkPacketReceive_ ## type ## _command(Packet *p) -#define DEF_CLIENT_SEND_COMMAND(type) void NetworkPacketSend_ ## type ## _command() -#define DEF_CLIENT_SEND_COMMAND_PARAM(type) void NetworkPacketSend_ ## type ## _command +#define DEF_CLIENT_SEND_COMMAND(type) NetworkRecvStatus NetworkPacketSend_ ## type ## _command() +#define DEF_CLIENT_SEND_COMMAND_PARAM(type) NetworkRecvStatus NetworkPacketSend_ ## type ## _command #define DEF_SERVER_RECEIVE_COMMAND(type) NetworkRecvStatus NetworkPacketReceive_ ## type ## _command(NetworkClientSocket *cs, Packet *p) -#define DEF_SERVER_SEND_COMMAND(type) void NetworkPacketSend_ ## type ## _command(NetworkClientSocket *cs) -#define DEF_SERVER_SEND_COMMAND_PARAM(type) void NetworkPacketSend_ ## type ## _command +#define DEF_SERVER_SEND_COMMAND(type) NetworkRecvStatus NetworkPacketSend_ ## type ## _command(NetworkClientSocket *cs) +#define DEF_SERVER_SEND_COMMAND_PARAM(type) NetworkRecvStatus NetworkPacketSend_ ## type ## _command #define SEND_COMMAND(type) NetworkPacketSend_ ## type ## _command #define RECEIVE_COMMAND(type) NetworkPacketReceive_ ## type ## _command |