aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2008-10-09 02:08:33 +0500
committerWaqas Hussain <waqas20@gmail.com>2008-10-09 02:08:33 +0500
commitc27c01b8930abe50c21269907d8a64e1daa57dbb (patch)
treeea47f9cc831806ea6d2dd0c832dcc3e97b9bcdb9 /plugins
parent4202397776bb1c34a5accb5de9cd0d58337b79b0 (diff)
downloadprosody-c27c01b8930abe50c21269907d8a64e1daa57dbb.tar.gz
prosody-c27c01b8930abe50c21269907d8a64e1daa57dbb.zip
Added: mod_register now replies with an error stanza when file write fails
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_register.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/mod_register.lua b/plugins/mod_register.lua
index b1bf4cc0..ad0ba478 100644
--- a/plugins/mod_register.lua
+++ b/plugins/mod_register.lua
@@ -29,7 +29,8 @@ add_iq_handler("c2s", "jabber:iq:register", function (session, stanza)
if usermanager_create_user(username, password, session.host) then -- password change -- TODO is this the right way?
send(session, st.reply(stanza));
else
- -- TODO internal error, unable to write file, file may be locked, etc
+ -- TODO unable to write file, file may be locked, etc, what's the correct error?
+ send(session, st.error_reply(stanza, "wait", "internal-server-error"));
end
else
send(session, st.error_reply(stanza, "modify", "bad-request"));
@@ -70,7 +71,8 @@ add_iq_handler("c2s_unauthed", "jabber:iq:register", function (session, stanza)
if usermanager_create_user(username, password, session.host) then
send(session, st.reply(stanza)); -- user created!
else
- -- TODO internal error, unable to write file, file may be locked, etc
+ -- TODO unable to write file, file may be locked, etc, what's the correct error?
+ send(session, st.error_reply(stanza, "wait", "internal-server-error"));
end
end
else