Fixed: Send correct error reply for IQs directed at unavailable resources

Tue, 07 Apr 2009 02:32:49 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Tue, 07 Apr 2009 02:32:49 +0500
changeset 967
b021403c5d80
parent 966
d2692d427496
child 968
13e3bdfb02f9

Fixed: Send correct error reply for IQs directed at unavailable resources

core/stanza_router.lua file | annotate | diff | comparison | revisions
--- a/core/stanza_router.lua	Tue Apr 07 02:24:37 2009 +0500
+++ b/core/stanza_router.lua	Tue Apr 07 02:32:49 2009 +0500
@@ -244,8 +244,8 @@
 							-- TODO deal with storage errors
 						end
 					end
-				else
-					-- TODO send IQ error
+				elseif stanza.attr.type == "get" or stanza.attr.type == "set" then
+					origin.send(st.error_reply(stanza, "cancel", "service-unavailable"));
 				end
 			else
 				-- User + resource is online...

mercurial