[Cluster-devel] conga/ricci/ricci Ricci.cpp
kupcevic at sourceware.org
kupcevic at sourceware.org
Mon Aug 14 23:53:22 UTC 2006
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
--- conga/ricci/ricci/Ricci.cpp 2006/08/10 22:53:09 1.15
+++ conga/ricci/ricci/Ricci.cpp 2006/08/14 23:53:21 1.16
@@ -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>("", "");
More information about the Cluster-devel
mailing list