Also LEAVE from function is now properly logged. Signed-off-by: Jan Friesse <jfriesse@xxxxxxxxxx> --- exec/votequorum.c | 25 ++++++++++++++----------- 1 files changed, 14 insertions(+), 11 deletions(-) diff --git a/exec/votequorum.c b/exec/votequorum.c index 05eb103..d9c5a01 100644 --- a/exec/votequorum.c +++ b/exec/votequorum.c @@ -927,25 +927,28 @@ static int votequorum_read_nodelist_configuration(uint32_t *votes, static int votequorum_qdevice_is_configured(uint32_t *qdevice_votes) { char *qdevice_model = NULL; + int ret = 0; ENTER(); - if ((icmap_get_string("quorum.device.model", &qdevice_model) == CS_OK) && - (strlen(qdevice_model))) { - free(qdevice_model); - if (icmap_get_uint32("quorum.device.votes", qdevice_votes) != CS_OK) { - *qdevice_votes = -1; - } - if (icmap_get_uint32("quorum.device.timeout", &qdevice_timeout) != CS_OK) { - qdevice_timeout = VOTEQUORUM_QDEVICE_DEFAULT_TIMEOUT; + if (icmap_get_string("quorum.device.model", &qdevice_model) == CS_OK) { + if (strlen(qdevice_model)) { + if (icmap_get_uint32("quorum.device.votes", qdevice_votes) != CS_OK) { + *qdevice_votes = -1; + } + if (icmap_get_uint32("quorum.device.timeout", &qdevice_timeout) != CS_OK) { + qdevice_timeout = VOTEQUORUM_QDEVICE_DEFAULT_TIMEOUT; + } + update_qdevice_can_operate(1); + ret = 1; } - update_qdevice_can_operate(1); - return 1; + + free(qdevice_model); } LEAVE(); - return 0; + return ret; } #define VOTEQUORUM_READCONFIG_STARTUP 0 -- 1.7.1 _______________________________________________ discuss mailing list discuss@xxxxxxxxxxxx http://lists.corosync.org/mailman/listinfo/discuss