diff options
author | Matthew Wild <mwild1@gmail.com> | 2008-10-24 03:06:55 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2008-10-24 03:06:55 +0100 |
commit | eb8e9997e03f6b0c399af0a6f88ee85684c74d06 (patch) | |
tree | 10e5a34e49bfea82d6b36b751d47d5185505c75e /util | |
parent | 162e3fb849f47089ad6114041374d66d48638db3 (diff) | |
download | prosody-eb8e9997e03f6b0c399af0a6f88ee85684c74d06.tar.gz prosody-eb8e9997e03f6b0c399af0a6f88ee85684c74d06.zip |
dialback keys now verified
Diffstat (limited to 'util')
-rw-r--r-- | util/stanza.lua | 7 | ||||
-rw-r--r-- | util/uuid.lua | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/util/stanza.lua b/util/stanza.lua index 6bc70ab9..95a19fbd 100644 --- a/util/stanza.lua +++ b/util/stanza.lua @@ -6,8 +6,14 @@ local setmetatable = setmetatable; local pairs = pairs; local ipairs = ipairs; local type = type; +local next = next; +local print = print; local unpack = unpack; local s_gsub = string.gsub; + +local debug = debug; +local log = require "util.logger".init("stanza"); + module "stanza" stanza_mt = {}; @@ -91,7 +97,6 @@ function stanza_mt.__tostring(t) if t.attr then for k, v in pairs(t.attr) do if type(k) == "string" then attr_string = attr_string .. s_format(" %s='%s'", k, tostring(v)); end end end - return s_format("<%s%s>%s</%s>", t.name, attr_string, children_text, t.name); end diff --git a/util/uuid.lua b/util/uuid.lua index 489522aa..e1c02c91 100644 --- a/util/uuid.lua +++ b/util/uuid.lua @@ -2,7 +2,7 @@ local m_random = math.random; module "uuid" -function uuid_generate() +function generate() return m_random(0, 99999999); end |