Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] (PR#9738) client_has_hack is bad
Home

[Freeciv-Dev] (PR#9738) client_has_hack is bad

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#9738) client_has_hack is bad
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 21 Aug 2004 09:39:46 -0700
Reply-to: rt@xxxxxxxxxxx

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

> [jdorje - Fri Aug 20 03:36:49 2004]:

> 2.  The value is initialized to FALSE when the client is launched.  It 
> is later set to TRUE when the client acquires hack access.  But after 
> this is is not reset to FALSE when the client disconnects.

This is easy to fix.  This patch should do it.

jason

Index: client/connectdlg_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/connectdlg_common.c,v
retrieving revision 1.18
diff -u -r1.18 connectdlg_common.c
--- client/connectdlg_common.c  21 Aug 2004 16:34:03 -0000      1.18
+++ client/connectdlg_common.c  21 Aug 2004 16:39:38 -0000
@@ -140,6 +140,7 @@
     server_pid = - 1;
 #endif    
   }
+  client_has_hack = FALSE;
 }   
 
 /**************************************************************** 
@@ -168,7 +169,8 @@
   char scriptcmdline[512];
 # endif
 
-  /* only one server (forked from this client) shall be running at a time */ 
+  /* only one server (forked from this client) shall be running at a time */
+  /* This also resets client_has_hack. */
   client_kill_server();
 
   append_output_window(_("Starting server..."));

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