projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2846e76
)
util.pubsub: Check whether node exists, when deleting
author
Florian Zeitz
<florob@babelmonkeys.de>
Wed, 12 Jun 2013 14:53:51 +0000
(16:53 +0200)
committer
Florian Zeitz
<florob@babelmonkeys.de>
Wed, 12 Jun 2013 14:53:51 +0000
(16:53 +0200)
util/pubsub.lua
patch
|
blob
|
history
diff --git
a/util/pubsub.lua
b/util/pubsub.lua
index 1ecbdfa81df130b0177ee0fb9b273f82b3884bb8..e1418c62d51fdccf96b4f8605789ce0378e11a9e 100644
(file)
--- a/
util/pubsub.lua
+++ b/
util/pubsub.lua
@@
-233,6
+233,9
@@
function service:delete(node, actor)
end
--
local node_obj = self.nodes[node];
+ if not node_obj then
+ return false, "item-not-found";
+ end
self.nodes[node] = nil;
self.config.broadcaster("delete", node, node_obj.subscribers);
return true;