Changeset

967:b021403c5d80

Fixed: Send correct error reply for IQs directed at unavailable resources
author Waqas Hussain <waqas20@gmail.com>
date Tue, 07 Apr 2009 02:32:49 +0500
parents 966:d2692d427496
children 968:13e3bdfb02f9
files core/stanza_router.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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...