aboutsummaryrefslogtreecommitdiffstats
path: root/core/sessionmanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-10-03 18:40:47 +0100
committerMatthew Wild <mwild1@gmail.com>2009-10-03 18:40:47 +0100
commit65aab24c5c734b6882a7d6b2bc8effffee9da4ac (patch)
treef49e5ad097602e971aaf2c8bc94f47489212cd39 /core/sessionmanager.lua
parent58c524a536d3f82d0c56121ab5ee2036e9067b49 (diff)
downloadprosody-65aab24c5c734b6882a7d6b2bc8effffee9da4ac.tar.gz
prosody-65aab24c5c734b6882a7d6b2bc8effffee9da4ac.zip
sessionmanager: Use UUID for stream ids to clients, no math.random anymore :)
Diffstat (limited to 'core/sessionmanager.lua')
-rw-r--r--core/sessionmanager.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua
index 0dfc0823..bc45d104 100644
--- a/core/sessionmanager.lua
+++ b/core/sessionmanager.lua
@@ -11,7 +11,6 @@
local tonumber, tostring = tonumber, tostring;
local ipairs, pairs, print, next= ipairs, pairs, print, next;
local collectgarbage = collectgarbage;
-local m_random = import("math", "random");
local format = import("string", "format");
local hosts = hosts;
@@ -168,7 +167,7 @@ function streamopened(session, attr)
session.host = attr.to or error("Client failed to specify destination hostname");
session.host = nameprep(session.host);
session.version = tonumber(attr.version) or 0;
- session.streamid = m_random(1000000, 99999999);
+ session.streamid = uuid_generate();
(session.log or session)("debug", "Client sent opening <stream:stream> to %s", session.host);
send("<?xml version='1.0'?>");