Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2003:
[Freeciv-Dev] (PR#6923) Free connection buffers at client exit
Home

[Freeciv-Dev] (PR#6923) Free connection buffers at client exit

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#6923) Free connection buffers at client exit
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Sat, 22 Nov 2003 01:28:22 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=6923 >


The buffers for the server connection are not freed at client
exit. The attached patch fixes this but reveals other problems:
disconnect_from_server calls close_socket_nomessage
 close_socket_nomessage calls set_client_state(CLIENT_PRE_GAME_STATE)
 set_client_state(CLIENT_PRE_GAME_STATE) calls set_unit_focus(NULL)
 set_unit_focus(NULL) calls refresh_tile_mapcanvas

refresh_tile_mapcanvas needs the tileset sprites. These sprites are
however already freed previously in ui_main.

Solutions welcome.

The patch isn't intended to be applied.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 Windows: Where do you want to go today?
 Linux: Where do you want to go tomorrow?
 BSD: Are you guys coming or what?

Index: client/civclient.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/civclient.c,v
retrieving revision 1.181
diff -u -u -r1.181 civclient.c
--- client/civclient.c  2003/11/19 17:30:51     1.181
+++ client/civclient.c  2003/11/22 09:22:47
@@ -245,7 +245,7 @@
 
   /* termination */
   attribute_flush();
-  client_remove_all_cli_conn();
+  disconnect_from_server();
   my_shutdown_network();
 
   client_game_free();

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#6923) Free connection buffers at client exit, Raimar Falke <=