Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2005:
[Freeciv-Dev] Re: (PR#14305) Client crash on /endgame
Home

[Freeciv-Dev] Re: (PR#14305) Client crash on /endgame

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#14305) Client crash on /endgame
From: "Mike Kaufman" <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 5 Dec 2005 20:37:13 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=14305 >

a proposed fix for the fix.

-mike

Index: server/srv_main.c
===================================================================
--- server/srv_main.c   (revision 11311)
+++ server/srv_main.c   (working copy)
@@ -1624,11 +1624,6 @@
       /* After sniff, re-zero the timer: (read-out above on next loop) */
       clear_timer_start(eot_timer);
 
-      if (server_state == GAME_OVER_STATE) {
-       free_timer(eot_timer);
-       return;
-      }
-
       conn_list_do_buffer(game.est_connections);
 
       sanity_check();
@@ -1641,6 +1636,10 @@
       end_phase();
 
       conn_list_do_unbuffer(game.est_connections);
+
+      if (server_state == GAME_OVER_STATE) {
+       break;
+      }
     }
     end_turn();
     freelog(LOG_DEBUG, "Sendinfotometaserver");
@@ -1651,7 +1650,10 @@
     }
   }
 
-  assert(0); /* not reached */
+  /* This will thaw the reports and agents at the client.  */
+  lsend_packet_thaw_hint(game.est_connections);
+
+  free_timer(eot_timer);
 }
 
 /**************************************************************************

[Prev in Thread] Current Thread [Next in Thread]