Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2000:
[Freeciv-Dev] Re: Potential Diplomacy Cheating (was: Freeciv Networking/
Home

[Freeciv-Dev] Re: Potential Diplomacy Cheating (was: Freeciv Networking/

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Jed Davis <jldavis@xxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, Andy Black <ablack@xxxxxxxxxxxxxx>, David Pfitzner <dwp@xxxxxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Potential Diplomacy Cheating (was: Freeciv Networking/Mac Server patches)
From: Marko Lindqvist <caz@xxxxxxxxx>
Date: Tue, 22 Aug 2000 01:07:00 +0300 (EET DST)

On Mon, 21 Aug 2000, Jed Davis wrote:

> --On Sunday, 20 August 2000 2:57 PM -0600 Andy Black 
> <ablack@xxxxxxxxxxxxxx> wrote:
> 
> > At 2:24 PM +1000 8/12/2000, David Pfitzner wrote:
> >>
> >> Incidently I would have thought a two-stage acceptance would be
> >> safer: what if someone adds a clause just _before_ the server
> >> receives your 'accept' packet (and then they quickly accept
> >> themselves).
> >
> > What about spliting the accept packet into an accept (set accept flag)
> > packet and a decline (clear accept flag) packet?  The client should always
> > send a decline packet after recieving new clauses.
> 
> Or, the server could clear its acceptance flag for all (both?) players 
> whenever a change is made, then notify the clients of the change.  If the 
> client has to receive the new clause and then send a decline, it seems to 
> me that there'd be a race condition for the other player to "accept" the 
> modified treaty without the new clause's being approved by the other player.

 Current situation is exactly whta you propose :) It still leaves
that (small) change David was worried about.

 I suggest using a key value to identify if 'accept' is for current
situation. Increase this key value whenever treaty changes (clause added
or removed). If client sends 'accept' with wrong (too small) key value, 
ignore it.


 Caz

--




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