summaryrefslogtreecommitdiff
path: root/src/messagehandler.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2020-06-27 11:37:27 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2020-06-27 11:37:27 +0200
commitd21701afe4230d633ae685ffeee6f5fb5a76f34d (patch)
treed91c68539a01757e1f350e3e53fdf36319ca126e /src/messagehandler.cc
parent7198cd81e1db3c92f99a7079e7820a6cdc51c40a (diff)
Check for existing ids in the tree when creating a new node.
Diffstat (limited to 'src/messagehandler.cc')
-rw-r--r--src/messagehandler.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/messagehandler.cc b/src/messagehandler.cc
index e4db5e7..9a00e46 100644
--- a/src/messagehandler.cc
+++ b/src/messagehandler.cc
@@ -70,10 +70,8 @@ MessageList handle_msg(MessageList msgList, clientid_t wsi)
INFO(messagehandler, "Handling create command\n");
try
{
- nodeid_t id = m.create.id;
- m.nodes = node_manager.createNode(m.create.parentid, &id,
+ m.nodes = node_manager.createNode(m.create.parentid, m.create.id,
m.create.insertbeforeid);
- m.create.id = id;
outmsgs.push_back(m);
}
catch (std::exception& e)