projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ae99e1
)
improved handling network errors (show message instead of stopping program)
author
Holger Schemel
<info@artsoft.org>
Sat, 29 Sep 2018 09:07:53 +0000
(11:07 +0200)
committer
Holger Schemel
<info@artsoft.org>
Sat, 29 Sep 2018 09:07:53 +0000
(11:07 +0200)
src/network.c
patch
|
blob
|
history
diff --git
a/src/network.c
b/src/network.c
index eb2c5bd01a3dec5d2247a1fc577f9131706320e1..1b9a1386a45cc52381d11282edf3f5028dba92e9 100644
(file)
--- 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);