projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9fe3faf
)
mod_s2s/s2sout.lib: Only attempt to create an IPv6 socket if LuaSocket supports IPv6
author
Matthew Wild
<mwild1@gmail.com>
Tue, 18 Jun 2013 11:11:40 +0000
(12:11 +0100)
committer
Matthew Wild
<mwild1@gmail.com>
Tue, 18 Jun 2013 11:11:40 +0000
(12:11 +0100)
plugins/mod_s2s/s2sout.lib.lua
patch
|
blob
|
history
diff --git
a/plugins/mod_s2s/s2sout.lib.lua
b/plugins/mod_s2s/s2sout.lib.lua
index cb2f8be4f8e791cc7c10ba3dbcd0ce04c885dc22..9e26dbee33ebd556f69f778391dcec67bddd38f9 100644
(file)
--- a/
plugins/mod_s2s/s2sout.lib.lua
+++ b/
plugins/mod_s2s/s2sout.lib.lua
@@
-276,10
+276,13
@@
function s2sout.make_connect(host_session, connect_host, connect_port)
host_session.secure = nil;
local conn, handler;
- if connect_host.proto == "IPv4" then
+ local proto = connect_host.proto;
+ if proto == "IPv4" then
conn, handler = socket.tcp();
- else
+ else
if proto == "IPv6" and socket.tcp6 then
conn, handler = socket.tcp6();
+ else
+ handler = "Unsupported protocol: "..tostring(proto);
end
if not conn then