[Freeciv-Dev] (PR#13924) Send attributes on intentional disconnect
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: |
[Freeciv-Dev] (PR#13924) Send attributes on intentional disconnect |
From: |
"Mateusz Stefek" <mstefek@xxxxxxxxx> |
Date: |
Fri, 9 Sep 2005 08:52:16 -0700 |
Reply-to: |
bugs@xxxxxxxxxxx |
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13924 >
With this patch the client sends updated attribute information to the
server whenever player intentionally disconnects from server. This
should fix problems with CMA in 24h/turn games.
--
mateusz
Index: client/clinet.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/clinet.c,v
retrieving revision 1.102.2.10
diff -u -r1.102.2.10 clinet.c
--- client/clinet.c 25 Aug 2005 19:27:48 -0000 1.102.2.10
+++ client/clinet.c 9 Sep 2005 15:49:39 -0000
@@ -72,6 +72,7 @@
#include "version.h"
#include "agents.h"
+#include "attribute.h"
#include "chatline_g.h"
#include "civclient.h"
#include "climisc.h"
@@ -239,6 +240,7 @@
**************************************************************************/
void disconnect_from_server(void)
{
+ attribute_flush();
close_socket_nomessage(&aconnection);
/* If it's internal server - kill him
* We assume that we are always connected to the internal server */
Index: client/gui-gtk-2.0/gui_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/gui_main.c,v
retrieving revision 1.81.2.17
diff -u -r1.81.2.17 gui_main.c
--- client/gui-gtk-2.0/gui_main.c 4 Aug 2005 16:57:35 -0000
1.81.2.17
+++ client/gui-gtk-2.0/gui_main.c 9 Sep 2005 15:50:04 -0000
@@ -1482,6 +1482,9 @@
{
gtk_widget_destroy(dialog);
if (response == GTK_RESPONSE_YES) {
+ if (aconnection.used) {
+ disconnect_from_server();
+ }
exit(EXIT_SUCCESS);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#13924) Send attributes on intentional disconnect,
Mateusz Stefek <=
|
|