Author: cazfi Date: Sat May 14 16:55:59 2016 New Revision: 32710 URL: http://svn.gna.org/viewcvs/freeciv?rev=32710&view=rev Log: Disconnect gtk-clients cleanly from the server even when Quitting client, instead of just Leaving game.
See bug #24629 Modified: branches/S2_5/client/gui-gtk-2.0/gui_main.c branches/S2_5/client/gui-gtk-3.0/gui_main.c Modified: branches/S2_5/client/gui-gtk-2.0/gui_main.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-gtk-2.0/gui_main.c?rev=32710&r1=32709&r2=32710&view=diff ============================================================================== --- branches/S2_5/client/gui-gtk-2.0/gui_main.c (original) +++ branches/S2_5/client/gui-gtk-2.0/gui_main.c Sat May 14 16:55:59 2016 @@ -1,4 +1,4 @@ -/********************************************************************** +/*********************************************************************** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -2056,6 +2056,9 @@ { gtk_widget_destroy(dialog); if (response == GTK_RESPONSE_YES) { + if (client.conn.used) { + disconnect_from_server(); + } quit_gtk_main(); } } Modified: branches/S2_5/client/gui-gtk-3.0/gui_main.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-gtk-3.0/gui_main.c?rev=32710&r1=32709&r2=32710&view=diff ============================================================================== --- branches/S2_5/client/gui-gtk-3.0/gui_main.c (original) +++ branches/S2_5/client/gui-gtk-3.0/gui_main.c Sat May 14 16:55:59 2016 @@ -1,4 +1,4 @@ -/********************************************************************** +/*********************************************************************** Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -2102,6 +2102,9 @@ { gtk_widget_destroy(dialog); if (response == GTK_RESPONSE_YES) { + if (client.conn.used) { + disconnect_from_server(); + } quit_gtk_main(); } } _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits