From 586944ec2bc991d1b96c8698e5da8b39b3d36f9a Mon Sep 17 00:00:00 2001 From: Ashish Chaudhari Date: Wed, 24 Feb 2016 17:11:27 -0800 Subject: experts: Multiple minor fixes/enhancements - Fixed segfault issue for graph modification errors - Demangled node type names and added quotes to "dot" labels to allow fully qualified C++ names - add_prop_node functions initialize the property objects in the tree in addition to data nodes - Passed in resolve mutex to desired data node correctly - Added == and != operators to data accessors --- host/lib/experts/expert_container.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'host/lib/experts/expert_container.cpp') diff --git a/host/lib/experts/expert_container.cpp b/host/lib/experts/expert_container.cpp index 3c4687d66..dc98ee4ed 100644 --- a/host/lib/experts/expert_container.cpp +++ b/host/lib/experts/expert_container.cpp @@ -145,7 +145,7 @@ public: ) { const dag_vertex_t& vertex = _get_vertex(*vi.first); if (vertex.get_class() != CLASS_WORKER) { - dot_str += str(boost::format(" %d [label=\"%s\",shape=%s,xlabel=%s];\n") % + dot_str += str(boost::format(" %d [label=\"%s\",shape=%s,xlabel=\"%s\"];\n") % boost::uint32_t(*vi.first) % vertex.get_name() % DATA_SHAPE % vertex.get_dtype()); } else { @@ -288,12 +288,12 @@ protected: //Sanity check the data node and ensure that it is not already in this graph EX_LOG(0, str(boost::format("add_data_node(%s)") % data_node->get_name())); if (data_node->get_class() == CLASS_WORKER) { - delete data_node; throw uhd::runtime_error("Supplied node " + data_node->get_name() + " is not a data/property node."); + delete data_node; } if (_datanode_map.find(data_node->get_name()) != _datanode_map.end()) { - delete data_node; throw uhd::runtime_error("Data node with name " + data_node->get_name() + " already exists"); + delete data_node; } try { @@ -329,12 +329,12 @@ protected: //Sanity check the data node and ensure that it is not already in this graph EX_LOG(0, str(boost::format("add_worker(%s)") % worker->get_name())); if (worker->get_class() != CLASS_WORKER) { - delete worker; throw uhd::runtime_error("Supplied node " + worker->get_name() + " is not a worker node."); + delete worker; } if (_worker_map.find(worker->get_name()) != _worker_map.end()) { - delete worker; throw uhd::runtime_error("Resolver with name " + worker->get_name() + " already exists."); + delete worker; } try { -- cgit v1.2.3