summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Forge.cpp6
-rw-r--r--src/server/events/CreatePort.cpp4
-rw-r--r--src/server/events/Delta.cpp5
3 files changed, 4 insertions, 11 deletions
diff --git a/src/Forge.cpp b/src/Forge.cpp
index 00194ce9..90106ad5 100644
--- a/src/Forge.cpp
+++ b/src/Forge.cpp
@@ -48,7 +48,7 @@ Forge::str(const Atom& atom, bool quoted)
ss << atom.get<float>();
} else if (atom.type() == Bool) {
ss << (atom.get<int32_t>() ? "true" : "false");
- } else if (atom.type() == URI) {
+ } else if (atom.type() == URI || atom.type() == Path) {
ss << (quoted ? "<" : "")
<< atom.ptr<const char>()
<< (quoted ? ">" : "");
@@ -56,10 +56,6 @@ Forge::str(const Atom& atom, bool quoted)
ss << (quoted ? "<" : "")
<< _map.unmap_uri(atom.get<int32_t>())
<< (quoted ? ">" : "");
- } else if (atom.type() == Path) {
- ss << (quoted ? "<" : "")
- << atom.ptr<const char>()
- << (quoted ? ">" : "");
} else if (atom.type() == String) {
ss << (quoted ? "\"" : "")
<< atom.ptr<const char>()
diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp
index 04e9bf22..d0dcbaf3 100644
--- a/src/server/events/CreatePort.cpp
+++ b/src/server/events/CreatePort.cpp
@@ -90,9 +90,7 @@ CreatePort::CreatePort(Engine& engine,
bool
CreatePort::pre_process(PreProcessContext&)
{
- if (_port_type == PortType::UNKNOWN) {
- return Event::pre_process_done(Status::UNKNOWN_TYPE, _path);
- } else if (!_flow) {
+ if (_port_type == PortType::UNKNOWN || !_flow) {
return Event::pre_process_done(Status::UNKNOWN_TYPE, _path);
} else if (_path.is_root()) {
return Event::pre_process_done(Status::BAD_URI, _path);
diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp
index 4e4887c5..31f55306 100644
--- a/src/server/events/Delta.cpp
+++ b/src/server/events/Delta.cpp
@@ -184,9 +184,8 @@ Delta::pre_process(PreProcessContext& ctx)
// Get "prototype" for preset (node to save state for)
const auto p = _properties.find(uris.lv2_prototype);
- if (p == _properties.end()) {
- return Event::pre_process_done(Status::BAD_REQUEST, _subject);
- } else if (!_engine.world().forge().is_uri(p->second)) {
+ if (p == _properties.end() ||
+ !_engine.world().forge().is_uri(p->second)) {
return Event::pre_process_done(Status::BAD_REQUEST, _subject);
}