Complete.Org: Mailing Lists: Archives: freeciv-dev: August 1999:
Re: [Freeciv-Dev] Patch: Server end for client data saving
Home

Re: [Freeciv-Dev] Patch: Server end for client data saving

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] Patch: Server end for client data saving
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Tue, 24 Aug 1999 11:49:30 +1000 (EST)

Falk Hueffner wrote:

> This example reminds me of another problem: While the client is
> disconnected, the city might be destroyed and the id
> reassigned. 

Actually, I think in the current code id values are never
re-used (probably helps avoid similar problems due to lag etc), 
although it may be nice to avoid relying on this.

> Well the server can easily save the values in a hash table. Oops,
> there are no hash tables in C :) Well I guess our list code would
> do. Or does somebody know a decent hash library? Would be really
> useful for some other things, too. I wish we could use the STL...

My tilespec patch uses in internal section_file (the things
implemented by common/registry.c) to do hashed lookups :-)

Its a bit the wrong way to do things (there should be separate
hashing functionality which is used by both the registry and
elsewhere), but it actually works quite well and conveniently.

Regards,
-- David

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