# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1368217880 -7200
# Node ID 19e1f9881bfcbfe36aeb3346dd875310e649a8d0
# Parent  f592409f5fcd9fa3606c7af1ab45964544e42f06# Parent  ae9672f4079aa169a88934488e356ce6d76f3e31
Merge 0.9->trunk

diff -r f592409f5fcd -r 19e1f9881bfc plugins/mod_c2s.lua
--- a/plugins/mod_c2s.lua	Fri May 10 10:48:07 2013 +0100
+++ b/plugins/mod_c2s.lua	Fri May 10 22:31:20 2013 +0200
@@ -157,7 +157,7 @@
 		session.send("</stream:stream>");
 		function session.send() return false; end
 		
-		local reason = (reason and (reason.text or reason.condition)) or reason;
+		local reason = (reason and (reason.name or reason.text or reason.condition)) or reason;
 		session.log("info", "c2s stream for %s closed: %s", session.full_jid or ("<"..session.ip..">"), reason or "session closed");
 
 		-- Authenticated incoming stream may still be sending us stanzas, so wait for </stream:stream> from remote