Przeglądaj źródła

Check icmap str get for clustername

Even this check is really not needed, it's nice to have it and on fault
ensure that cluster_name is really NULL.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Jan Friesse 12 lat temu
rodzic
commit
96a89a0085
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3 1
      exec/totemconfig.c

+ 3 - 1
exec/totemconfig.c

@@ -485,7 +485,9 @@ extern int totem_config_read (
 
 	icmap_get_uint32("totem.netmtu", &totem_config->net_mtu);
 
-	icmap_get_string("totem.cluster_name", &cluster_name);
+	if (icmap_get_string("totem.cluster_name", &cluster_name) != CS_OK) {
+		cluster_name = NULL;
+	}
 
 	totem_config->ip_version = AF_INET;
 	if (icmap_get_string("totem.ip_version", &str) == CS_OK) {