Changeset

3634:0d6b57edb7bd

net.xmpp{client,server,component}_listener: s/xml-not-well-formed/not-well-formed/ as per latest bis drafts.
author Waqas Hussain <waqas20@gmail.com>
date Sat, 20 Nov 2010 02:33:36 +0500
parents 3633:4069c37c54bc
children 3635:72f3619eeabd
files net/xmppclient_listener.lua net/xmppcomponent_listener.lua net/xmppserver_listener.lua
diffstat 3 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/net/xmppclient_listener.lua	Sat Nov 20 02:28:40 2010 +0500
+++ b/net/xmppclient_listener.lua	Sat Nov 20 02:33:36 2010 +0500
@@ -41,7 +41,7 @@
 		session:close("invalid-namespace");
 	elseif error == "parse-error" then
 		(session.log or log)("debug", "Client XML parse error: %s", tostring(data));
-		session:close("xml-not-well-formed");
+		session:close("not-well-formed");
 	elseif error == "stream-error" then
 		local condition, text = "undefined-condition";
 		for child in data:children() do
@@ -148,7 +148,7 @@
 			local ok, err = stream:feed(data);
 			if ok then return; end
 			log("debug", "Received invalid XML (%s) %d bytes: %s", tostring(err), #data, data:sub(1, 300):gsub("[\r\n]+", " "):gsub("[%z\1-\31]", "_"));
-			session:close("xml-not-well-formed");
+			session:close("not-well-formed");
 		end
 	end
 	
--- a/net/xmppcomponent_listener.lua	Sat Nov 20 02:28:40 2010 +0500
+++ b/net/xmppcomponent_listener.lua	Sat Nov 20 02:33:36 2010 +0500
@@ -42,7 +42,7 @@
 		session:close("invalid-namespace");
 	elseif error == "parse-error" then
 		session.log("warn", "External component %s XML parse error: %s", tostring(session.host), tostring(data));
-		session:close("xml-not-well-formed");
+		session:close("not-well-formed");
 	elseif error == "stream-error" then
 		local condition, text = "undefined-condition";
 		for child in data:children() do
@@ -186,7 +186,7 @@
 			local ok, err = parser:parse(data);
 			if ok then return; end
 			log("debug", "Received invalid XML (%s) %d bytes: %s", tostring(err), #data, data:sub(1, 300):gsub("[\r\n]+", " "):gsub("[%z\1-\31]", "_"));
-			session:close("xml-not-well-formed");
+			session:close("not-well-formed");
 		end
 		
 		session.dispatch_stanza = stream_callbacks.handlestanza;
--- a/net/xmppserver_listener.lua	Sat Nov 20 02:28:40 2010 +0500
+++ b/net/xmppserver_listener.lua	Sat Nov 20 02:33:36 2010 +0500
@@ -27,7 +27,7 @@
 		session:close("invalid-namespace");
 	elseif error == "parse-error" then
 		session.log("debug", "Server-to-server XML parse error: %s", tostring(error));
-		session:close("xml-not-well-formed");
+		session:close("not-well-formed");
 	elseif error == "stream-error" then
 		local condition, text = "undefined-condition";
 		for child in data:children() do
@@ -136,7 +136,7 @@
 			if ok then return; end
 			(session.log or log)("warn", "Received invalid XML: %s", data);
 			(session.log or log)("warn", "Problem was: %s", err);
-			session:close("xml-not-well-formed");
+			session:close("not-well-formed");
 		end
 	end