mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-06-02 21:51:37 +00:00
Fix segfault if rrp_mode: MODE isn't set in configuration file.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1047 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
parent
252fc54461
commit
a8c449fbae
@ -139,6 +139,8 @@ extern int totem_config_read (
|
||||
|
||||
totem_config->secauth = 1;
|
||||
|
||||
strcpy (totem_config->rrp_mode, "none");
|
||||
|
||||
objdb->object_find_reset (OBJECT_PARENT_HANDLE);
|
||||
|
||||
if (objdb->object_find (
|
||||
@ -420,6 +422,15 @@ int totem_config_validate (
|
||||
goto parse_error;
|
||||
}
|
||||
|
||||
/*
|
||||
* RRP values validation
|
||||
*/
|
||||
if (strcmp (totem_config->rrp_mode, "none") &&
|
||||
strcmp (totem_config->rrp_mode, "active") &&
|
||||
strcmp (totem_config->rrp_mode, "passive")) {
|
||||
sprintf (local_error_reason, "The RRP mode \"%s\" specified is invalid. It must be none, active, or passive.\n", totem_config->rrp_mode);
|
||||
goto parse_error;
|
||||
}
|
||||
if (totem_config->rrp_problem_count_timeout == 0) {
|
||||
totem_config->rrp_problem_count_timeout = RRP_PROBLEM_COUNT_TIMEOUT;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user