]> git.proxmox.com Git - mirror_corosync.git/commit
totemconfig: Key change process dependencies
authorJan Friesse <jfriesse@redhat.com>
Thu, 20 Mar 2014 15:18:16 +0000 (16:18 +0100)
committerJan Friesse <jfriesse@redhat.com>
Tue, 25 Mar 2014 14:29:12 +0000 (15:29 +0100)
commitb95ebd640eb45267d69822c8292a0098a8e4180e
treecc85fc31669e3f4e3d36bede88ea5fa387a5df9b
parenteeb2384157351ff460be0648d954e5e97213d532
totemconfig: Key change process dependencies

When key with dependency was changed, dependant keys were not recomputed.
Nice example is consensus timeout. If token timout was changed,
consensus timeout was not recomputed correctly (nether via cmap change
of key nor via cfg reload).

Solution is almost complete refactor of handling volatile defaults.

totem_volatile_config_read now handles not only storing cmap key to
totem_config structure, but also checking of existence, comparing with
zero value and properly storing defaults.

totem_set_volatile_defaults is gone. It's function was splitted into
totem_volatile_config_read and totem_volatile_config_validate functions.

Reload callback and change of key callback are now mostly same functions
and both calls totem_volatile_config_read.

Patch also fixes small memory leak. totem.vsftype key is not used for
long time and original totem_volatile_config_read wasn't freeing
allocated memory returned by icmap_get_string. Whole reading of
totem.vsftype is removed.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
exec/totemconfig.c