[lcdproc] Hashes and config file. ;-) (and dynamic load)
Tue, 27 Mar 2001 15:59:03 +0100 (BST)
On Tue, 27 Mar 2001, Joris Robijn wrote:
> > >> value = get_parameter_int( "key", defaultvalue );
> > >
> > >Nice. Should this only available while the config is read or over the
> > >complete lifetime of the server ?
> > I guess over the complete lifetime of the driver,
> > but most driver will only read this at init time. ;-)
> Wo. Ehm we don't want a windoze registry at least :)
Yes it's a plain text file and only writeable with a texteditor by the
So a driver can't replace the setting for the client ...
> The config file has been read completely anyway, so why not keep the
> data ? And it's easy to add a write function later...
It's a waste of memory i think.
What would you do with a write function ? (sorry I can't see any use).
> > >In the latter case we should use a hash to store config in the LCDd.
> > I have been suggestion hash for that,
> > then someone said we only need it the protocol,
> > now you tell me we need it again for config file... ;-)
> Yeah that's odd ! But let's wait with hashing or not hashing, because
> using a hashtable is an optimization. If all is implemenmted well, it
> can be added without any other code knowing it. But if we only have 10
Yes I agree with you.
> sections with 10 keys, using a hashtable would be like using a tractor
> in your backyard :)
Hmmm, but if you query the config database often then the tractor would be
> > If it has to be re-read and that some config of some LCD is change
> > (baud rate? size? ...) should we reset and reinitialise the driver?
> > How do we detect changes, how do we tell the driver?
> kill -HUP pid
> Then it should reread config files, and tell drivers that the config
> has changed. Then they should decide what to do. Is that OK?
Yes it's ok. But what with removed/added drivers ?
> I don't know how we should tell the clients. We could do a EVENT
> TYPE=sighup or something.
I think we should inform all clients about the start and end (end with the
last seen cmd id ?) so they know that all msg in this intervall will be
> > What do we do with current client?
> No problem, they just don't do config yet.
When I remove the input driver for the key which are registered by a
Andre' Breiler | Tel: +44 1737 839532
BBC Internet Services | Email: email@example.com
Kingswood Warren,Tadworth,Surrey,UK | URL: http://support.bbc.co.uk/
Mail me. Don't phone if possible. And use a Subject line.
To unsubscribe from this list send a blank message to