# HG changeset patch
# User Matthew Wild <mwild1@gmail.com>
# Date 1262618492 0
# Node ID a33036b7e5ab28f21f71942540c4a0aae960ba6d
# Parent  6006e6bb1c2807f43d6fd98b419523e99520f563
verse.plugins.bind: Fix incorrect variable name causing traceback on unsuccessful bind

diff -r 6006e6bb1c28 -r a33036b7e5ab plugins/bind.lua
--- 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);