[lcdproc] Hashes and config file. ;-) (and dynamic load)
Joris Robijn
joris@robijn.net
Tue, 27 Mar 2001 13:47:31 +0200
> >> 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 :)
The config file has been read completely anyway, so why not keep the
data ? And it's easy to add a write function later...
> >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
sections with 10 keys, using a hashtable would be like using a tractor
in your backyard :)
> 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?
I don't know how we should tell the clients. We could do a EVENT
TYPE=sighup or something.
> What do we do with current client?
No problem, they just don't do config yet.
Joris
--
Joris Robijn <joris@robijn.net>
Home: 053 4311 553
Mobile: 06 288 41 964
// To understand recursion, we must first understand recursion
-----------------------------------------------------------
To unsubscribe from this list send a blank message to
lcdproc-unsubscribe@lists.omnipotent.net