Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2005:
[Freeciv-Dev] (PR#13789) remove game.game_connections
Home

[Freeciv-Dev] (PR#13789) remove game.game_connections

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#13789) remove game.game_connections
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 26 Aug 2005 12:30:51 -0700
Reply-to: bugs@xxxxxxxxxxx

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

This patch removes game.game_connections.

There is no real purpose in the server for having game_connections. 
est_connections lists all connections but game_connections only shows 
those who are linked to a player.  Most game packets are only sent to 
game_connections while est_connections only gets out-of-game info.

In the client there are reasons and problems with game_connections, both 
of which come into play when a client is in est_connections but not 
game_connections.  Currently in this state the client will not get game 
or player-info packets so a detached player has their startscreen 
crippled and cannot see any other players.  However there is a reason 
for this too in that a detached player has game.player_ptr equal to NULL 
which tends to cause segfaults in all the game packets.

Recent fixes to the client solve most of these segfaults.  Further 
testing will be needed of course before this patch can be applied. 
However I believe the current system is fundamentally flawed and the 
only way to move to a clean, workable design is to start by removing 
game_connections.  Under this patch all game packets go to 
est_connections which means everybody.  This causes no problems in the 
server (as I said) because city and tile info already has their own 
checks (these functions were written [long ago] with detached and 
observer players in mind).

In conclusion, this patch isn't ready to be committed yet.  But 
hopefully it soon will be.

-jason

Index: client/civclient.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/civclient.c,v
retrieving revision 1.230
diff -p -u -r1.230 civclient.c
--- client/civclient.c  25 Aug 2005 20:36:12 -0000      1.230
+++ client/civclient.c  25 Aug 2005 20:46:00 -0000
@@ -307,7 +307,6 @@ int main(int argc, char *argv[])
 
   game.all_connections = conn_list_new();
   game.est_connections = conn_list_new();
-  game.game_connections = conn_list_new();
 
   ui_init();
   charsets_init();
@@ -377,7 +376,6 @@ void ui_exit(void)
   helpdata_done(); /* ui_exit() unlinks help text list */
   conn_list_free(game.all_connections);
   conn_list_free(game.est_connections);
-  conn_list_free(game.game_connections);
   exit(EXIT_SUCCESS);
 }
 
@@ -568,7 +566,6 @@ void client_remove_cli_conn(struct conne
   }
   conn_list_unlink(game.all_connections, pconn);
   conn_list_unlink(game.est_connections, pconn);
-  conn_list_unlink(game.game_connections, pconn);
   assert(pconn != &aconnection);
   free(pconn);
 }
Index: client/packhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v
retrieving revision 1.543
diff -p -u -r1.543 packhand.c
--- client/packhand.c   25 Aug 2005 20:36:12 -0000      1.543
+++ client/packhand.c   25 Aug 2005 20:46:01 -0000
@@ -1610,7 +1610,6 @@ void handle_conn_info(struct packet_conn
       }
       conn_list_append(game.all_connections, pconn);
       conn_list_append(game.est_connections, pconn);
-      conn_list_append(game.game_connections, pconn);
     } else {
       freelog(LOG_DEBUG, "Server reports updated connection %d %s",
              pinfo->id, pinfo->username);
Index: common/game.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/game.h,v
retrieving revision 1.198
diff -p -u -r1.198 game.h
--- common/game.h       18 Aug 2005 06:44:28 -0000      1.198
+++ common/game.h       25 Aug 2005 20:46:03 -0000
@@ -75,7 +75,6 @@ struct civ_game {
   struct player players[MAX_NUM_PLAYERS + MAX_NUM_BARBARIANS];
   struct conn_list *all_connections;        /* including not yet established */
   struct conn_list *est_connections;        /* all established client conns */
-  struct conn_list *game_connections;       /* involved in game; send map etc 
*/
   char save_name[MAX_LEN_NAME];
   bool scorelog;
   int seed;
Index: server/citytools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/citytools.c,v
retrieving revision 1.343
diff -p -u -r1.343 citytools.c
--- server/citytools.c  25 Aug 2005 19:12:23 -0000      1.343
+++ server/citytools.c  25 Aug 2005 20:46:04 -0000
@@ -1382,7 +1382,7 @@ static void broadcast_city_info(struct c
   /* send to non-player observers:
    * should these only get dumb_city type info?
    */
-  conn_list_iterate(game.game_connections, pconn) {
+  conn_list_iterate(game.est_connections, pconn) {
     if (!pconn->player && pconn->observer) {
       package_city(pcity, &packet, FALSE);
       send_packet_city_info(pconn, &packet);
Index: server/connecthand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/connecthand.c,v
retrieving revision 1.53
diff -p -u -r1.53 connecthand.c
--- server/connecthand.c        8 Aug 2005 16:30:24 -0000       1.53
+++ server/connecthand.c        25 Aug 2005 20:46:04 -0000
@@ -91,6 +91,8 @@ static void establish_new_connection(str
   /* "establish" the connection */
   pconn->established = TRUE;
 
+  conn_list_append(game.est_connections, pconn);
+
   /* introduce the server to the connection */
   if (my_gethostname(hostname, sizeof(hostname)) == 0) {
     notify_conn(dest, _("Welcome to the %s Server running at %s port %d."),
@@ -183,7 +185,6 @@ static void establish_new_connection(str
   }
 
   send_conn_info(dest, game.est_connections);
-  conn_list_append(game.est_connections, pconn);
   send_conn_info(game.est_connections, dest);
   send_player_info_c(NULL, dest);
   reset_all_start_commands();
@@ -688,7 +689,6 @@ bool attach_connection_to_player(struct 
 
   pconn->player = pplayer;
   conn_list_append(pplayer->connections, pconn);
-  conn_list_append(game.game_connections, pconn);
 
   send_game_info(NULL);
   send_player_info(pplayer, NULL);
@@ -711,7 +711,6 @@ bool unattach_connection_from_player(str
   }
 
   conn_list_unlink(pconn->player->connections, pconn);
-  conn_list_unlink(game.game_connections, pconn);
 
   pconn->player->is_connected = FALSE;
   pconn->observer = FALSE;
Index: server/gamehand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/gamehand.c,v
retrieving revision 1.166
diff -p -u -r1.166 gamehand.c
--- server/gamehand.c   25 Aug 2005 19:12:23 -0000      1.166
+++ server/gamehand.c   25 Aug 2005 20:46:04 -0000
@@ -287,7 +287,7 @@ void init_new_game(void)
 void send_start_phase_to_clients(void)
 {
   /* This function is so simple it could probably be dropped... */
-  dlsend_packet_start_phase(game.game_connections, game.info.phase);
+  dlsend_packet_start_phase(game.est_connections, game.info.phase);
 }
 
 /**************************************************************************
@@ -306,11 +306,10 @@ void send_year_to_clients(int year)
 
   apacket.year = year;
   apacket.turn = game.info.turn;
-  lsend_packet_new_year(game.game_connections, &apacket);
+  lsend_packet_new_year(game.est_connections, &apacket);
 
   /* Hmm, clients could add this themselves based on above packet? */
-  notify_conn_ex(game.game_connections, NULL, E_NEXT_YEAR, _("Year: %s"),
-                textyear(year));
+  notify_conn_ex(NULL, NULL, E_NEXT_YEAR, _("Year: %s"), textyear(year));
 }
 
 
@@ -326,14 +325,14 @@ void send_game_state(struct conn_list *d
 
 /**************************************************************************
   Send game_info packet; some server options and various stuff...
-  dest==NULL means game.game_connections
+  dest==NULL means game.est_connections
 **************************************************************************/
 void send_game_info(struct conn_list *dest)
 {
   struct packet_game_info ginfo;
 
   if (!dest) {
-    dest = game.game_connections;
+    dest = game.est_connections;
   }
 
   ginfo = game.info;
@@ -383,7 +382,7 @@ int update_timeout(void)
     game.timeoutint += game.timeoutintinc;
 
     if (game.info.timeout > GAME_MAX_TIMEOUT) {
-      notify_conn_ex(game.game_connections, NULL, E_SETTING,
+      notify_conn_ex(NULL, NULL, E_SETTING,
                     _("The turn timeout has exceeded its maximum value, "
                       "fixing at its maximum"));
       freelog(LOG_DEBUG, "game.info.timeout exceeded maximum value");
@@ -391,7 +390,7 @@ int update_timeout(void)
       game.timeoutint = 0;
       game.timeoutinc = 0;
     } else if (game.info.timeout < 0) {
-      notify_conn_ex(game.game_connections, NULL, E_SETTING,
+      notify_conn_ex(NULL, NULL, E_SETTING,
                     _("The turn timeout is smaller than zero, "
                       "fixing at zero."));
       freelog(LOG_DEBUG, "game.info.timeout less than zero");
Index: server/maphand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/maphand.c,v
retrieving revision 1.173
diff -p -u -r1.173 maphand.c
--- server/maphand.c    23 Aug 2005 00:09:41 -0000      1.173
+++ server/maphand.c    25 Aug 2005 20:46:05 -0000
@@ -406,7 +406,7 @@ void give_citymap_from_player_to_player(
 
 /**************************************************************************
   Send all tiles known to specified clients.
-  If dest is NULL means game.game_connections.
+  If dest is NULL means game.est_connections.
   
   Note for multiple connections this may change "sent" multiple times
   for single player.  This is ok, because "sent" data is just optimised
@@ -418,7 +418,7 @@ void send_all_known_tiles(struct conn_li
   int tiles_sent;
 
   if (!dest) {
-    dest = game.game_connections;
+    dest = game.est_connections;
   }
 
   /* send whole map piece by piece to each player to balance the load
@@ -443,7 +443,7 @@ void send_all_known_tiles(struct conn_li
 
 /**************************************************************************
   Send tile information to all the clients in dest which know and see
-  the tile. If dest is NULL, sends to all clients (game.game_connections)
+  the tile. If dest is NULL, sends to all clients (game.est_connections)
   which know and see tile.
 
   Note that this function does not update the playermap.  For that call
@@ -454,7 +454,7 @@ void send_tile_info(struct conn_list *de
   struct packet_tile_info info;
 
   if (!dest) {
-    dest = game.game_connections;
+    dest = game.est_connections;
   }
 
   info.x = ptile->x;
@@ -1138,7 +1138,7 @@ void update_tile_knowledge(struct tile *
   } players_iterate_end;
 
   /* Global observers */
-  conn_list_iterate(game.game_connections, pconn) {
+  conn_list_iterate(game.est_connections, pconn) {
     struct player *pplayer = pconn->player;
     if (!pplayer && pconn->observer) {
       send_tile_info(pconn->self, ptile);
Index: server/plrhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/plrhand.c,v
retrieving revision 1.415
diff -p -u -r1.415 plrhand.c
--- server/plrhand.c    25 Aug 2005 19:15:50 -0000      1.415
+++ server/plrhand.c    25 Aug 2005 20:46:06 -0000
@@ -860,11 +860,11 @@ void send_player_info_c(struct player *s
   Send information about player src, or all players if src is NULL,
   to specified players dest (that is, to dest->connections).
   As convenience to old code, dest may be NULL meaning send to
-  game.game_connections.  
+  game.est_connections.  
 **************************************************************************/
 void send_player_info(struct player *src, struct player *dest)
 {
-  send_player_info_c(src, (dest ? dest->connections : game.game_connections));
+  send_player_info_c(src, (dest ? dest->connections : game.est_connections));
 }
 
 /**************************************************************************
@@ -1126,7 +1126,7 @@ void server_remove_player(struct player 
   notify_conn(game.est_connections,
              _("%s has been removed from the game."), pplayer->name);
   
-  dlsend_packet_player_remove(game.game_connections, pplayer->player_no);
+  dlsend_packet_player_remove(game.est_connections, pplayer->player_no);
 
   /* Note it is ok to remove the _current_ item in a list_iterate. */
   conn_list_iterate(pplayer->connections, pconn) {
Index: server/report.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/report.c,v
retrieving revision 1.70
diff -p -u -r1.70 report.c
--- server/report.c     18 Aug 2005 06:44:29 -0000      1.70
+++ server/report.c     25 Aug 2005 20:46:06 -0000
@@ -199,7 +199,7 @@ static void historian_generic(enum histo
   }
   my_snprintf(title, sizeof(title), _(historian_message[which_news]),
     _(historian_name[myrand(ARRAY_SIZE(historian_name))]));
-  page_conn_etype(game.game_connections, _("Historian Publishes!"),
+  page_conn_etype(game.est_connections, _("Historian Publishes!"),
                  title, buffer, E_BROADCAST_REPORT);
 }
 
@@ -1103,7 +1103,7 @@ void report_final_scores(void)
     packet.spaceship[i] = get_spaceship(size[i].player); 
   }  
 
-  lsend_packet_endgame_report(game.game_connections, &packet);
+  lsend_packet_endgame_report(game.est_connections, &packet);
 }      
 
 /**************************************************************************
Index: server/sanitycheck.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/sanitycheck.c,v
retrieving revision 1.73
diff -p -u -r1.73 sanitycheck.c
--- server/sanitycheck.c        25 Aug 2005 19:21:20 -0000      1.73
+++ server/sanitycheck.c        25 Aug 2005 20:46:06 -0000
@@ -495,10 +495,6 @@ static void check_connections(void)
   /* est_connections is a subset of all_connections */
   SANITY_CHECK(conn_list_size(game.all_connections)
               >= conn_list_size(game.est_connections));
-
-  /* game_connections is a subset of est_connections */
-  SANITY_CHECK(conn_list_size(game.est_connections)
-              >= conn_list_size(game.game_connections));
 }
 
 /**************************************************************************
Index: server/sernet.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/sernet.c,v
retrieving revision 1.143
diff -p -u -r1.143 sernet.c
--- server/sernet.c     15 Aug 2005 03:33:27 -0000      1.143
+++ server/sernet.c     25 Aug 2005 20:46:06 -0000
@@ -199,7 +199,6 @@ void close_connection(struct connection 
   /* safe to do these even if not in lists: */
   conn_list_unlink(game.all_connections, pconn);
   conn_list_unlink(game.est_connections, pconn);
-  conn_list_unlink(game.game_connections, pconn);
 
   pconn->player = NULL;
   pconn->access_level = ALLOW_NONE;
@@ -225,7 +224,6 @@ void close_connections_and_socket(void)
   /* Remove the game connection lists and make sure they are empty. */
   conn_list_free(game.all_connections);
   conn_list_free(game.est_connections);
-  conn_list_free(game.game_connections);
 
   my_closesocket(sock);
   my_closesocket(socklan);
@@ -914,7 +912,6 @@ void init_connections(void)
 
   game.all_connections = conn_list_new();
   game.est_connections = conn_list_new();
-  game.game_connections = conn_list_new();
 
   for(i=0; i<MAX_NUM_CONNECTIONS; i++) { 
     struct connection *pconn = &connections[i];
@@ -1001,17 +998,7 @@ static void send_ping_times_to_all(void)
   int i;
 
   i = 0;
-  conn_list_iterate(game.game_connections, pconn) {
-    if (!pconn->used) {
-      continue;
-    }
-    i++;
-  } conn_list_iterate_end;
-
-  packet.connections = i;
-
-  i = 0;
-  conn_list_iterate(game.game_connections, pconn) {
+  conn_list_iterate(game.est_connections, pconn) {
     if (!pconn->used) {
       continue;
     }
@@ -1020,6 +1007,8 @@ static void send_ping_times_to_all(void)
     packet.ping_time[i] = pconn->ping_time;
     i++;
   } conn_list_iterate_end;
+  packet.connections = i;
+
   lsend_packet_conn_ping_info(game.est_connections, &packet);
 }
 
Index: server/spacerace.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/spacerace.c,v
retrieving revision 1.41
diff -p -u -r1.41 spacerace.c
--- server/spacerace.c  5 May 2005 18:32:53 -0000       1.41
+++ server/spacerace.c  25 Aug 2005 20:46:06 -0000
@@ -110,14 +110,14 @@ void spaceship_calc_derived(struct playe
 /**************************************************************************
   Send details of src's spaceship (or spaceships of all players
   if src is NULL) to specified destinations.  If dest is NULL then
-  game.game_connections is used.
+  game.est_connections is used.
 **************************************************************************/
 void send_spaceship_info(struct player *src, struct conn_list *dest)
 {
   int j;
 
   if (!dest) {
-    dest = game.game_connections;
+    dest = game.est_connections;
   }
 
   players_iterate(pplayer) {
Index: server/srv_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/srv_main.c,v
retrieving revision 1.287
diff -p -u -r1.287 srv_main.c
--- server/srv_main.c   18 Aug 2005 06:53:31 -0000      1.287
+++ server/srv_main.c   25 Aug 2005 20:46:07 -0000
@@ -522,7 +522,7 @@ static void begin_phase(bool is_new_phas
 {
   freelog(LOG_DEBUG, "Begin phase");
 
-  conn_list_do_buffer(game.game_connections);
+  conn_list_do_buffer(game.est_connections);
 
   phase_players_iterate(pplayer) {
     pplayer->phase_done = FALSE;
@@ -555,7 +555,7 @@ static void begin_phase(bool is_new_phas
   } phase_players_iterate_end;
 
   flush_packets();  /* to curb major city spam */
-  conn_list_do_unbuffer(game.game_connections);
+  conn_list_do_unbuffer(game.est_connections);
 
   phase_players_iterate(pplayer) {
     update_revolution(pplayer);
@@ -797,9 +797,9 @@ void start_game(void)
   }
 
   /* Remove ALLOW_CTRL from whoever has it (gotten from 'first'). */
-  conn_list_iterate(game.game_connections, pconn) {
+  conn_list_iterate(game.est_connections, pconn) {
     if (pconn->access_level == ALLOW_CTRL) {
-      notify_conn(game.game_connections, _("%s lost control cmdlevel on "
+      notify_conn(NULL, _("%s lost control cmdlevel on "
                   "game start.  Use voting from now on."), pconn->username);
       pconn->access_level = ALLOW_INFO;
     }
@@ -1276,7 +1276,7 @@ void handle_nation_select_req(struct pla
 
     name[0] = my_toupper(name[0]);
 
-    notify_conn_ex(game.game_connections, NULL, E_NATION_SELECTED,
+    notify_conn_ex(NULL, NULL, E_NATION_SELECTED,
                   _("%s is the %s ruler %s."), pplayer->username,
                   new_nation->name, name);
 
@@ -1572,7 +1572,7 @@ static void main_loop(void)
    * Do this before the body so that the PACKET_THAW_HINT packet is
    * balanced. 
    */
-  lsend_packet_freeze_hint(game.game_connections);
+  lsend_packet_freeze_hint(game.est_connections);
 
   while(server_state==RUN_GAME_STATE) {
     /* The beginning of a turn.
@@ -1593,7 +1593,7 @@ static void main_loop(void)
       /* 
        * This will thaw the reports and agents at the client.
        */
-      lsend_packet_thaw_hint(game.game_connections);
+      lsend_packet_thaw_hint(game.est_connections);
 
       /* Before sniff (human player activites), report time to now: */
       freelog(LOG_VERBOSE, "End/start-turn server/ai activities: %g seconds",
@@ -1625,18 +1625,18 @@ static void main_loop(void)
        break;
       }
 
-      conn_list_do_buffer(game.game_connections);
+      conn_list_do_buffer(game.est_connections);
 
       sanity_check();
 
       /* 
        * This will freeze the reports and agents at the client.
        */
-      lsend_packet_freeze_hint(game.game_connections);
+      lsend_packet_freeze_hint(game.est_connections);
 
       end_phase();
 
-      conn_list_do_unbuffer(game.game_connections);
+      conn_list_do_unbuffer(game.est_connections);
     }
     if (server_state == GAME_OVER_STATE) {
       break;
@@ -1653,7 +1653,7 @@ static void main_loop(void)
   /* 
    * This will thaw the reports and agents at the client.
    */
-  lsend_packet_thaw_hint(game.game_connections);
+  lsend_packet_thaw_hint(game.est_connections);
 
   free_timer(eot_timer);
 }
@@ -1717,7 +1717,7 @@ void srv_main(void)
   while (TRUE) {
     srv_loop();
 
-    send_game_state(game.game_connections, CLIENT_GAME_OVER_STATE);
+    send_game_state(game.est_connections, CLIENT_GAME_OVER_STATE);
     report_final_scores();
     show_map_to_all();
     notify_player(NULL, _("The game is over..."));
@@ -1877,9 +1877,9 @@ static void srv_loop(void)
     } players_iterate_end;
   }
 
-  lsend_packet_freeze_hint(game.game_connections);
-  send_all_info(game.game_connections);
-  lsend_packet_thaw_hint(game.game_connections);
+  lsend_packet_freeze_hint(game.est_connections);
+  send_all_info(game.est_connections);
+  lsend_packet_thaw_hint(game.est_connections);
   
   if(game.info.is_new_game) {
     init_new_game();
@@ -1892,7 +1892,7 @@ static void srv_loop(void)
     } players_iterate_end;
   }
 
-  send_game_state(game.game_connections, CLIENT_GAME_RUNNING_STATE);
+  send_game_state(game.est_connections, CLIENT_GAME_RUNNING_STATE);
 
   /*** Where the action is. ***/
   main_loop();
Index: server/stdinhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/stdinhand.c,v
retrieving revision 1.431
diff -p -u -r1.431 stdinhand.c
--- server/stdinhand.c  18 Aug 2005 06:53:31 -0000      1.431
+++ server/stdinhand.c  25 Aug 2005 20:46:07 -0000
@@ -1596,7 +1596,7 @@ static bool explain_option(struct connec
 static bool wall(char *str, bool check)
 {
   if (!check) {
-    notify_conn_ex(game.game_connections, NULL, E_MESSAGE_WALL,
+    notify_conn_ex(NULL, NULL, E_MESSAGE_WALL,
                   _("Server Operator: %s"), str);
   }
   return TRUE;
Index: server/unithand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/unithand.c,v
retrieving revision 1.348
diff -p -u -r1.348 unithand.c
--- server/unithand.c   25 Aug 2005 19:12:23 -0000      1.348
+++ server/unithand.c   25 Aug 2005 20:46:08 -0000
@@ -673,7 +673,7 @@ static void send_combat(struct unit *pat
 
   /* Send combat info to non-player observers as well.  They already know
    * about the unit so no unit_info is needed. */
-  conn_list_iterate(game.game_connections, pconn) {
+  conn_list_iterate(game.est_connections, pconn) {
     if (!pconn->player && pconn->observer) {
       send_packet_unit_combat_info(pconn, &combat);
     }
@@ -786,8 +786,8 @@ static void handle_unit_attack_request(s
       return;
     } 
 
-    dlsend_packet_nuke_tile_info(game.game_connections, def_tile->x,
-                                def_tile->y);
+    dlsend_packet_nuke_tile_info(game.est_connections,
+                                def_tile->x, def_tile->y);
 
     wipe_unit(punit);
     do_nuclear_explosion(pplayer, def_tile);
Index: server/unittools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/unittools.c,v
retrieving revision 1.377
diff -p -u -r1.377 unittools.c
--- server/unittools.c  25 Aug 2005 19:12:23 -0000      1.377
+++ server/unittools.c  25 Aug 2005 20:46:08 -0000
@@ -1851,7 +1851,7 @@ void send_unit_info_to_onlookers(struct 
   struct packet_unit_short_info sinfo;
   
   if (!dest) {
-    dest = game.game_connections;
+    dest = game.est_connections;
   }
 
   CHECK_UNIT(punit);
@@ -1885,7 +1885,7 @@ void send_unit_info_to_onlookers(struct 
 void send_unit_info(struct player *dest, struct unit *punit)
 {
   struct conn_list *conn_dest = (dest ? dest->connections
-                                : game.game_connections);
+                                : game.est_connections);
   send_unit_info_to_onlookers(conn_dest, punit, punit->tile, FALSE);
 }
 
@@ -1996,7 +1996,7 @@ void do_nuclear_explosion(struct player 
     do_nuke_tile(pplayer, ptile1);
   } square_iterate_end;
 
-  notify_conn_ex(game.game_connections, ptile, E_NUKE,
+  notify_conn_ex(NULL, ptile, E_NUKE,
                 _("%s detonated a nuke!"), pplayer->name);
 }
 

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#13789) remove game.game_connections, Jason Short <=