conga/ricci/ricci Ricci.cpp
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
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>("", "");