From: Holger Schemel Date: Sat, 29 Sep 2018 09:07:53 +0000 (+0200) Subject: improved handling network errors (show message instead of stopping program) X-Git-Tag: 4.1.1.0~22 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=d6338db94d8402c3f47a422069d352fced1e496e;p=rocksndiamonds.git improved handling network errors (show message instead of stopping program) --- diff --git a/src/network.c b/src/network.c index eb2c5bd0..1b9a1386 100644 --- a/src/network.c +++ b/src/network.c @@ -284,7 +284,16 @@ boolean ConnectToServer(char *hostname, int port) SDLNet_ResolveHost(&ip, hostname, port); if (ip.host == INADDR_NONE) - Error(ERR_EXIT, "cannot locate host '%s'", hostname); + { + char message[100]; + + sprintf(message, "Failed to resolve network server hostname '%s'!", + hostname); + + DrawNetworkText_Failed(message); + + return FALSE; + } else server_host = SDLNet_Read32(&ip.host);