Diff

mod_adhoc/adhoc/adhoc.lib.lua @ 169:b3a68e71b8a1

mod_adhoc, mod_adhoc_cmd_admin: Handle errors according to XEP
author Florian Zeitz < florob@babelmonkeys.de>
date Thu, 10 Jun 2010 22:32:49 +0200
parent 149:b8a89ebf71e3
child 207:1ae653712e37
line wrap: on
line diff
--- a/mod_adhoc/adhoc/adhoc.lib.lua	Thu Jun 10 13:01:36 2010 +0100
+++ b/mod_adhoc/adhoc/adhoc.lib.lua	Thu Jun 10 22:32:49 2010 +0200
@@ -1,3 +1,9 @@
+-- Copyright (C) 2009-2010 Florian Zeitz
+--
+-- This file is MIT/X11 licensed. Please see the
+-- COPYING file in the source package for more information.
+--
+
 local st, uuid = require "util.stanza", require "util.uuid";
 
 local xmlns_cmd = "http://jabber.org/protocol/commands";
@@ -38,7 +44,8 @@
 	elseif data.status == "error" then
 		states[sessionid] = nil;
 		stanza = st.error_reply(stanza, data.error.type, data.error.condition, data.error.message);
-		cmdtag = command:cmdtag("canceled", sessionid);
+		origin.send(stanza);
+		return true;
 	else 
 		cmdtag = command:cmdtag("executing", sessionid);
 	end