summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2015-07-03 17:54:50 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2015-07-03 17:54:50 +0200
commit5eb98cbc51135264ad0b82e0ba790df17f1d70c6 (patch)
treed3d23e48d4106ec1e3df9ff5db50b30567c59468 /src
parent85853c4ae5e48359feac44370b4c0f05fbb23147 (diff)
parent04c4ec77155f9da75a9e5ec5a66a389317dede26 (diff)
downloaddabmux-5eb98cbc51135264ad0b82e0ba790df17f1d70c6.tar.gz
dabmux-5eb98cbc51135264ad0b82e0ba790df17f1d70c6.tar.bz2
dabmux-5eb98cbc51135264ad0b82e0ba790df17f1d70c6.zip
Merge branch 'master' into next
Diffstat (limited to 'src')
-rw-r--r--src/ConfigParser.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp
index 89f6d87..6092e66 100644
--- a/src/ConfigParser.cpp
+++ b/src/ConfigParser.cpp
@@ -395,15 +395,17 @@ void parse_ptree(boost::property_tree::ptree& pt,
component->type = component_type;
int success = -5;
- string componentlabel = pt_comp.get<string>("label");
+ string componentlabel = pt_comp.get("label", "");
string componentshortlabel(componentlabel);
try {
componentshortlabel = pt_comp.get<string>("shortlabel");
success = component->label.setLabel(componentlabel, componentshortlabel);
}
catch (ptree_error &e) {
- etiLog.level(warn) << "Component short label undefined, "
- "truncating label " << componentlabel;
+ if (not componentlabel.empty()) {
+ etiLog.level(warn) << "Component short label undefined, "
+ "truncating label " << componentlabel;
+ }
success = component->label.setLabel(componentlabel);
}