aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-12-04 20:08:44 +0000
committerMatthew Wild <mwild1@gmail.com>2012-12-04 20:08:44 +0000
commit1e14564983afc5941868d319e71daaa0897ab06e (patch)
tree5d3ad214d2ea5801a335c49abb280e7291aa7f07
parent1e6906ab0af916dddf8913f97b99ff9ac02c8f4e (diff)
downloadprosody-1e14564983afc5941868d319e71daaa0897ab06e.tar.gz
prosody-1e14564983afc5941868d319e71daaa0897ab06e.zip
portmanager: Return first service with the specified name from get_service() (instead of the array of possible services) (thanks xnyhps)
-rw-r--r--core/portmanager.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/portmanager.lua b/core/portmanager.lua
index 8938be65..7427a8eb 100644
--- a/core/portmanager.lua
+++ b/core/portmanager.lua
@@ -190,7 +190,7 @@ function get_service_at(interface, port)
end
function get_service(service_name)
- return services[service_name];
+ return (services[service_name] or {})[1];
end
function get_active_services(...)