Minor fixes
authorMatthew Mondor <mmondor@pulsar-zone.net>
Wed, 25 Jun 2014 15:33:48 +0000 (15:33 +0000)
committerMatthew Mondor <mmondor@pulsar-zone.net>
Wed, 25 Jun 2014 15:33:48 +0000 (15:33 +0000)
mmsoftware/mystic_ships/client/src/thread_net_recv.c

index 3f593e5..14346ee 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: thread_net_recv.c,v 1.1 2006/12/31 08:32:39 mmondor Exp $ */
+/* $Id: thread_net_recv.c,v 1.2 2014/06/25 15:33:48 mmondor Exp $ */
 
 /*
  * Copyright (c) 2006, Matthew Mondor
@@ -19,6 +19,7 @@
 #include <main.h>
 #include <thread_net_recv.h>
 #include <recvq.h>
+#include <screen.h>
 #include <conf.h>
 
 
@@ -158,11 +159,8 @@ state_recv(void)
                 */
                while ((res = recvq_read(&recvq)) == 0) ;
 
-               if (res == -1) {
-                       (void) fprintf(stderr,
-                           "Connection with server lost\n");
-                       break;
-               }
+               if (res == -1)
+                       screen_error("Lost server connection");
 
                /*
                 * res == 1.  We therefore can fill our message and dispatch