Software /
code /
prosody
Comparison
core/portmanager.lua @ 5225:079e4cb23f89
portmanager: Return first service with the specified name from get_service() (instead of the array of possible services) (thanks xnyhps)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 04 Dec 2012 20:08:44 +0000 |
parent | 5087:71a5a6a6c74c |
child | 5319:d20861bf900b |
comparison
equal
deleted
inserted
replaced
5223:76e4651142e1 | 5225:079e4cb23f89 |
---|---|
188 local data = active_services:search(nil, interface, port)[1][1]; | 188 local data = active_services:search(nil, interface, port)[1][1]; |
189 return data.service, data.server; | 189 return data.service, data.server; |
190 end | 190 end |
191 | 191 |
192 function get_service(service_name) | 192 function get_service(service_name) |
193 return services[service_name]; | 193 return (services[service_name] or {})[1]; |
194 end | 194 end |
195 | 195 |
196 function get_active_services(...) | 196 function get_active_services(...) |
197 return active_services; | 197 return active_services; |
198 end | 198 end |