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

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

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Jason Short <rt@xxxxxxxxxxx>
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: (PR#6735) Server crashed upgrading a frigate
From: Raimar Falke <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Mon, 10 Nov 2003 19:46:58 +0100

On Thu, Nov 06, 2003 at 10:23:39AM -0800, Jason Short wrote:
> Raimar Falke wrote:
> > On Wed, Nov 05, 2003 at 05:27:59AM -0800, Per I. Mathisen wrote:
> > 
> >>On Wed, 5 Nov 2003, Raimar Falke wrote:
> >>
> >>>>I think the simplest solution to this problem is simply to ban upgrades of
> >>>>transporters with passengers where the result is a unit with less
> >>>>transport capacity than the number of passengers transported.
> >>>
> >>>I agree. What changes to the ruleset are required?
> >>
> >>No ruleset changes. We just check, when you want to upgrade, if transport
> >>is carrying more passengers than we could carry if we upgraded - if that
> >>is the case, no upgrade for you (for now).
> > 
> > 
> > So this patch is a 4-liner?!
> 
> Changes should be done in the client to disable the upgrade (disable the 
> menu, and probably some changes to the units dialog) and to the server 
> (with an error message).
> 
> Attached patch (untested) mmakes the server change.  However I'd suggest 
> a can_upgrade_unit() be added to common/unit.[ch] for use by the clients 
> and one of the server functions (but not the other, which gives a 
> specific error message).

I don't like the idea to add conditions to various code parts. The
solution is one unified function. The attached patch implementes this.

To reproduce load the game and upgrade the ship in Falmouth and press
turn done.

The patch doesn't work like expected in the client case (it should see
the problem (ship carries units) at the client and not send the
request to the server) but transported_by is not valid in the client.

If you approve the design I will convert the other clients and add
docu.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "If at first you don't succeed... well so much for skydiving."

Attachment: 6735.gz
Description: application/gunzip

Attachment: upgrade_patch1.diff
Description: Text document


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