aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-11-15 00:35:09 +0000
committerMatthew Wild <mwild1@gmail.com>2008-11-15 00:35:09 +0000
commit785e99a1afd75882fed1f1f7ca8d7daa1bf34018 (patch)
tree033cd05b2127aa173d0726b9ba1c61298512249f
parent1c704dcef79c640ffdbc259af63c29ac47599e89 (diff)
parentfc57c3a09a9ca234f45bb3a1e9b3d8fd8d48d2e0 (diff)
downloadprosody-785e99a1afd75882fed1f1f7ca8d7daa1bf34018.tar.gz
prosody-785e99a1afd75882fed1f1f7ca8d7daa1bf34018.zip
Merge from waqas
-rw-r--r--core/offlinemanager.lua2
-rw-r--r--core/rostermanager.lua2
-rw-r--r--net/xmppclient_listener.lua2
-rw-r--r--util/datamanager.lua2
4 files changed, 4 insertions, 4 deletions
diff --git a/core/offlinemanager.lua b/core/offlinemanager.lua
index 283de5e3..e71da446 100644
--- a/core/offlinemanager.lua
+++ b/core/offlinemanager.lua
@@ -16,7 +16,7 @@ function load(node, host)
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;
diff --git a/core/rostermanager.lua b/core/rostermanager.lua
index 235f2aee..a08f989d 100644
--- a/core/rostermanager.lua
+++ b/core/rostermanager.lua
@@ -232,7 +232,7 @@ function unsubscribed(username, host, jid)
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
diff --git a/net/xmppclient_listener.lua b/net/xmppclient_listener.lua
index ca4cbbb0..914dd78e 100644
--- a/net/xmppclient_listener.lua
+++ b/net/xmppclient_listener.lua
@@ -78,7 +78,7 @@ function xmppclient.disconnect(conn)
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
diff --git a/util/datamanager.lua b/util/datamanager.lua
index 0f00da1b..80b35733 100644
--- a/util/datamanager.lua
+++ b/util/datamanager.lua
@@ -6,7 +6,7 @@ local loadfile, setfenv, pcall = loadfile, setfenv, pcall;
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;