diff options
author | David Robillard <d@drobilla.net> | 2007-10-02 04:17:53 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-10-02 04:17:53 +0000 |
commit | d130806ade2b9bb404e1267262ca4859c15c01a0 (patch) | |
tree | f01dbc8aa63a52d951bb1f8d15cddef18a8da8a8 /src/libs | |
parent | 8ef163fd6325bf61a2109f49b250da9917275f1d (diff) | |
download | ingen-d130806ade2b9bb404e1267262ca4859c15c01a0.tar.gz ingen-d130806ade2b9bb404e1267262ca4859c15c01a0.tar.bz2 ingen-d130806ade2b9bb404e1267262ca4859c15c01a0.zip |
Fix deadlock on patch save.
git-svn-id: http://svn.drobilla.net/lad/ingen@800 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/client/Serializer.cpp | 19 | ||||
-rw-r--r-- | src/libs/client/Serializer.hpp | 3 |
2 files changed, 5 insertions, 17 deletions
diff --git a/src/libs/client/Serializer.cpp b/src/libs/client/Serializer.cpp index d3d3abfd..1652e546 100644 --- a/src/libs/client/Serializer.cpp +++ b/src/libs/client/Serializer.cpp @@ -151,10 +151,14 @@ Serializer::path_to_node_id(const Path& path) NodeMap::iterator i = _node_map.find(path); if (i != _node_map.end()) { + assert(i->second); + assert(i->second.get_node()); return i->second; } else { Node id = _world.blank_id(); + assert(id); _node_map[path] = id; + assert(_node_map[path]); return id; } } @@ -417,24 +421,9 @@ Serializer::serialize_connection(SharedPtr<ConnectionModel> connection) throw (s if (!_model) throw std::logic_error("serialize_connection called without serialization in progress"); - const Node connection_id = Node(_model->world(), Node::BLANK, - path_to_node_id(connection->src_port_path()).to_string() - + "-" + path_to_node_id(connection->dst_port_path()).to_string()); - _model->add_statement(path_to_node_id(connection->dst_port_path()), "ingen:connectedTo", path_to_node_id(connection->src_port_path())); - - /*_model->add_statement(connection_id, "rdf:type", "ingen:Connection"; - - _model->add_statement(connection_id, - "ingen:source", - path_to_node_id(connection->src_port_path())); - - _model->add_statement(connection_id, - "ingen:destination", - path_to_node_id(connection->dst_port_path())); - */ } diff --git a/src/libs/client/Serializer.hpp b/src/libs/client/Serializer.hpp index bb3b0e8a..4a6cfa6a 100644 --- a/src/libs/client/Serializer.hpp +++ b/src/libs/client/Serializer.hpp @@ -28,7 +28,6 @@ #include <raul/Atom.hpp> #include <raul/RDFWorld.hpp> #include <raul/RDFModel.hpp> -#include <raul/PathTable.hpp> #include "ObjectModel.hpp" namespace Ingen { @@ -75,7 +74,7 @@ private: Raul::RDF::Node path_to_node_id(const Path& path); Raul::RDF::Node patch_path_to_rdf_id(const Path& path); - typedef Raul::PathTable<Raul::RDF::Node> NodeMap; + typedef std::map<Raul::Path, Raul::RDF::Node> NodeMap; SharedPtr<ObjectModel> _root_object; Mode _mode; |