verse.plugins.bind: Fix incorrect variable name causing traceback on unsuccessful bind

Mon, 04 Jan 2010 15:21:32 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Mon, 04 Jan 2010 15:21:32 +0000
changeset 43
a33036b7e5ab
parent 42
6006e6bb1c28
child 44
37396504de5f

verse.plugins.bind: Fix incorrect variable name causing traceback on unsuccessful bind

plugins/bind.lua file | annotate | diff | comparison | revisions
--- a/plugins/bind.lua	Sun Jan 03 18:01:54 2010 +0000
+++ b/plugins/bind.lua	Mon Jan 04 15:21:32 2010 +0000
@@ -16,8 +16,8 @@
 					stream.jid, stream.bound = result_jid, true;
 					stream:event("binding-success", full_jid);
 				elseif reply.attr.type == "error" then
-					local err = result:child_with_name("error");
-					local type, condition, text = result:get_error();
+					local err = reply:child_with_name("error");
+					local type, condition, text = reply:get_error();
 					stream:event("binding-failure", { error = condition, text = text, type = type });
 				end
 			end);

mercurial