diff options
author | rubidium <rubidium@openttd.org> | 2007-01-04 19:12:45 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-01-04 19:12:45 +0000 |
commit | 85d1768b340e1cb7176dd27f2a0a383b2fd3589d (patch) | |
tree | feb7563ffb9e9e1b2b49988996129e641cd78c09 /src/network/network.c | |
parent | 627ebe8430720cb282fc1ae7f5fe6ff02f0593d0 (diff) | |
download | openttd-85d1768b340e1cb7176dd27f2a0a383b2fd3589d.tar.xz |
(svn r7830) -Codechange: let NetworkCoreInitialize return a bool, so we have to set _network_available only once.
Diffstat (limited to 'src/network/network.c')
-rw-r--r-- | src/network/network.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/network/network.c b/src/network/network.c index 1612c2be2..d3bad7574 100644 --- a/src/network/network.c +++ b/src/network/network.c @@ -1336,20 +1336,18 @@ static void NetworkGenerateUniqueId(void) snprintf(_network_unique_id, sizeof(_network_unique_id), "%s", hex_output); } -// This tries to launch the network for a given OS +/** This tries to launch the network for a given OS */ void NetworkStartUp(void) { DEBUG(net, 3, "[core] starting network..."); - // Network is available - _network_available = true; + /* Network is available */ + _network_available = NetworkCoreInitialize();; _network_dedicated = false; _network_last_advertise_frame = 0; _network_need_advertise = true; _network_advertise_retries = 0; - NetworkCoreInitialize(); - /* Load the ip from the openttd.cfg */ _network_server_bind_ip = inet_addr(_network_server_bind_ip_host); /* And put the data back in it in case it was an invalid ip */ @@ -1375,7 +1373,7 @@ void NetworkStartUp(void) NetworkFindIPs(); } -// This shuts the network down +/** This shuts the network down */ void NetworkShutDown(void) { NetworkDisconnect(); |