(svn r1090) -Fix: Made the _openttd_revision variable global, and with that

hopefully killed the windows-revision problem. If WITH_REV is defined, 
for both Windows as *nix system _openttd_revision is filled with normal 
info, else _openttd_revision is set to 'norev000'
-Fix: Small possible server-crash
This commit is contained in:
truelight
2004-12-14 20:27:00 +00:00
parent 52aeaebde0
commit b6c74c1c20
9 changed files with 26 additions and 53 deletions

View File

@@ -577,7 +577,7 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_JOIN)
NetworkRecv_string(p, client_revision, sizeof(client_revision));
// Too bad, when WITH_REV is disabled, we can not compare the version.
#if defined(WITH_REV) || defined (WITH_REV_HACK)
#if defined(WITH_REV)
// Check if the client has WITH_REV enabled
if (strncmp("norev000", client_revision, sizeof(client_revision)) != 0) {
if (strncmp(_network_game_info.server_revision, client_revision, sizeof(_network_game_info.server_revision) - 1) != 0) {
@@ -1215,6 +1215,9 @@ void NetworkUpdateClientInfo(uint16 client_index)
ci = NetworkFindClientInfoFromIndex(client_index);
if (ci == NULL)
return;
FOR_ALL_CLIENTS(cs) {
SEND_COMMAND(PACKET_SERVER_CLIENT_INFO)(cs, ci);
}