Some bugs fixed

Sat, 15 Nov 2008 05:33:14 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Sat, 15 Nov 2008 05:33:14 +0500
changeset 267
6303b7454ad0
parent 260
182f0c895676
child 268
fd0607c8f179

Some bugs fixed

core/offlinemanager.lua file | annotate | diff | comparison | revisions
core/rostermanager.lua file | annotate | diff | comparison | revisions
net/xmppclient_listener.lua file | annotate | diff | comparison | revisions
util/datamanager.lua file | annotate | diff | comparison | revisions
--- a/core/offlinemanager.lua	Fri Nov 14 02:54:56 2008 +0000
+++ b/core/offlinemanager.lua	Sat Nov 15 05:33:14 2008 +0500
@@ -16,7 +16,7 @@
 	local data = datamanager.list_load(node, host, "offline");
 	if not data then return; end
 	for k, v in ipairs(data) do
-		stanza = st.deserialize(v);
+		local stanza = st.deserialize(v);
 		stanza:tag("delay", {xmlns = "urn:xmpp:delay", from = host, stamp = stanza.attr.stamp}):up(); -- XEP-0203
 		stanza:tag("x", {xmlns = "jabber:x:delay", from = host, stamp = stanza.attr.stamp_legacy}):up(); -- XEP-0091 (deprecated)
 		stanza.attr.stamp, stanza.attr.stamp_legacy = nil, nil;
--- a/core/rostermanager.lua	Fri Nov 14 02:54:56 2008 +0000
+++ b/core/rostermanager.lua	Sat Nov 15 05:33:14 2008 +0500
@@ -234,7 +234,7 @@
 		if item.subscription == "from" then
 			item.subscription = "none";
 			changed = true;
-		elseif item.subscription == both then
+		elseif item.subscription == "both" then
 			item.subscription = "to";
 			changed = true;
 		end
--- a/net/xmppclient_listener.lua	Fri Nov 14 02:54:56 2008 +0000
+++ b/net/xmppclient_listener.lua	Sat Nov 15 05:33:14 2008 +0500
@@ -78,7 +78,7 @@
 	if session then
 		if session.last_presence and session.last_presence.attr.type ~= "unavailable" then
 			local pres = st.presence{ type = "unavailable" };
-			if err == "closed" then err = "connection closed"; end
+			if err == "closed" then err = "connection closed"; end --FIXME where did err come from?
 			pres:tag("status"):text("Disconnected: "..err);
 			session.stanza_dispatch(pres);
 		end
--- a/util/datamanager.lua	Fri Nov 14 02:54:56 2008 +0000
+++ b/util/datamanager.lua	Sat Nov 15 05:33:14 2008 +0500
@@ -6,7 +6,7 @@
 local log = log;
 local io_open = io.open;
 local os_remove = os.remove;
-local tostring = tostring;
+local tostring, tonumber = tostring, tonumber;
 local error = error;
 local next = next;
 local t_insert = table.insert;

mercurial