Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2003:
[Freeciv-Dev] (PR#6735) Server crashed upgrading a frigate
Home

[Freeciv-Dev] (PR#6735) Server crashed upgrading a frigate

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rt-guest@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#6735) Server crashed upgrading a frigate
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 3 Dec 2003 15:45:48 -0800
Reply-to: rt@xxxxxxxxxxx

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

> [jdorje - Thu Nov 13 20:41:32 2003]:
> 
> > [i-freeciv-lists@xxxxxxxxxxxxx - Mon Nov 10 18:47:17 2003]:

> > The
> > solution is one unified function. The attached patch implementes this.
> 
> I don't like this either, though.  upgrade_unit is a server function and
> shouldn't be called from the common code.  Adding a stub to the client
> is bad.

To clarify: the way you have things written unit_upgrade (a test-and-set
function in the common code) calls upgrade_unit (the "set" part of the
operation, in server and client) if it is given certain parameters.  The
client must guarantee that it never gives these parameters, since the
client's can never call upgrade_unit.  This is extemely bad IMO.

Nor by doing this do we cut down on the duplicated rules.  The rules are
still duplicated in upgrade_unit and unit_upgrade.  For instance
upgrade_unit does not reassign any transported units, and thus
unit_upgrade must check to make sure the transport capacity is large enough.

jason



[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#6735) Server crashed upgrading a frigate, Jason Short <=