aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2015-03-26 16:49:03 +0000
committerMatthew Wild <mwild1@gmail.com>2015-03-26 16:49:03 +0000
commit6c87dbadb1c9f96442f874dd78edd8b85abfb472 (patch)
tree5c9f629f0035697faa311531db3b3d0267e4f1e3 /plugins
parent0cbc9ecbecd3caf2bab74dd77abab53ca77691f6 (diff)
parenteacc284fd7299addca1a4f1a8332de6eab86480b (diff)
downloadprosody-6c87dbadb1c9f96442f874dd78edd8b85abfb472.tar.gz
prosody-6c87dbadb1c9f96442f874dd78edd8b85abfb472.zip
Merge 0.10->trunk
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_http.lua8
-rw-r--r--plugins/mod_s2s/mod_s2s.lua6
2 files changed, 14 insertions, 0 deletions
diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua
index 8bda1cac..086887fb 100644
--- a/plugins/mod_http.lua
+++ b/plugins/mod_http.lua
@@ -74,6 +74,8 @@ function moduleapi.http_url(module, app_name, default_path)
return url_build(url);
end
end
+ module:log("warn", "No http ports enabled, can't generate an external URL");
+ return "http://disabled.invalid/";
end
function module.add_host(module)
@@ -118,6 +120,12 @@ function module.add_host(module)
module:log("error", "Invalid route in %s, %q. See http://prosody.im/doc/developers/http#routes", app_name, key);
end
end
+ local services = portmanager.get_active_services();
+ if services:get("https") or services:get("http") then
+ module:log("debug", "Serving '%s' at %s", app_name, module:http_url(app_name, app_path));
+ else
+ module:log("warn", "Not listening on any ports, '%s' will be unreachable", app_name);
+ end
end
local function http_app_removed(event)
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua
index f9165f20..a58c6421 100644
--- a/plugins/mod_s2s/mod_s2s.lua
+++ b/plugins/mod_s2s/mod_s2s.lua
@@ -499,6 +499,12 @@ function session_stream_attrs(session, from, to, attr)
if not from or (hosts[from] and hosts[from].modules.dialback) then
attr["xmlns:db"] = 'jabber:server:dialback';
end
+ if not from then
+ attr.from = '';
+ end
+ if not to then
+ attr.to = '';
+ end
end
-- Session initialization logic shared by incoming and outgoing