Skip to contentSkip to conversation

conga/ricci/ricci Ricci.cpp

Cluster-devel [email protected] 1 participant 1 message Aug 14, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: conga
Changes by: kupcevic at sourceware.org 2006-08-14 23:53:21

Modified files:
ricci/ricci : Ricci.cpp

Log message:
ricci: display clustername in place of clusteralias if alias not set

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/ricci/Ricci.cpp.diff?cvsroot=cluster&r1=1.15&r2=1.16

ricci/ricci/Ricci.cpp +6 -3
@@ -494,10 +494,13 @@
     String cluster_conf(buff, length);
     
     XMLObject xml(parseXML(cluster_conf));
-    delete [] buff;
-    buff = 0;
+    delete [] buff; buff = 0;
     
-    return pair<String, String>(xml.get_attr("name"), xml.get_attr("alias"));
+    String name = xml.get_attr("name");
+    String alias = xml.get_attr("alias");
+    if (utils::strip(alias).empty())
+      alias = name;
+    return pair<String, String>(name, alias);
   } catch ( ... ) {
     delete [] buff;
     return pair<String, String>("", "");