aboutsummaryrefslogtreecommitdiffstats
path: root/core/s2smanager.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-03-30 05:26:10 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-03-30 05:26:10 +0500
commit2365831f7dfc9f7b3d3ce66ce38c19ad0f2a93e4 (patch)
tree4b0dccb5b7193b25852a97056da30c8a7afa6b19 /core/s2smanager.lua
parent1de71a88b9f0b705474e6f89f08711229adc447b (diff)
downloadprosody-2365831f7dfc9f7b3d3ce66ce38c19ad0f2a93e4.tar.gz
prosody-2365831f7dfc9f7b3d3ce66ce38c19ad0f2a93e4.zip
Fixed: Some nil access bugs
Diffstat (limited to 'core/s2smanager.lua')
-rw-r--r--core/s2smanager.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index 4e12eb8a..f4f7ad36 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -212,8 +212,8 @@ function streamopened(session, attr)
if session.direction == "incoming" then
-- Send a reply stream header
- session.to_host = nameprep(attr.to);
- session.from_host = nameprep(attr.from);
+ session.to_host = attr.to and nameprep(attr.to);
+ session.from_host = attr.from and nameprep(attr.from);
session.streamid = uuid_gen();
(session.log or log)("debug", "incoming s2s received <stream:stream>");