Software /
code /
prosody
Comparison
core/hostmanager.lua @ 6618:469151b08065
hostmanager: Rename variable to avoid shadowing 'type()' function
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 03 Apr 2015 19:22:55 +0100 |
parent | 6548:a10c9d6825a4 |
child | 6621:352fa2cae1c9 |
child | 6706:60c692828cf6 |
comparison
equal
deleted
inserted
replaced
6617:a455dac79f58 | 6618:469151b08065 |
---|---|
53 end | 53 end |
54 | 54 |
55 prosody_events.add_handler("server-starting", load_enabled_hosts); | 55 prosody_events.add_handler("server-starting", load_enabled_hosts); |
56 | 56 |
57 local function host_send(stanza) | 57 local function host_send(stanza) |
58 local name, type = stanza.name, stanza.attr.type; | 58 local name, stanza_type = stanza.name, stanza.attr.type; |
59 if type == "error" or (name == "iq" and type == "result") then | 59 if stanza_type == "error" or (name == "iq" and stanza_type == "result") then |
60 local dest_host_name = select(2, jid_split(stanza.attr.to)); | 60 local dest_host_name = select(2, jid_split(stanza.attr.to)); |
61 local dest_host = hosts[dest_host_name] or { type = "unknown" }; | 61 local dest_host = hosts[dest_host_name] or { type = "unknown" }; |
62 log("warn", "Unhandled response sent to %s host %s: %s", dest_host.type, dest_host_name, tostring(stanza)); | 62 log("warn", "Unhandled response sent to %s host %s: %s", dest_host.type, dest_host_name, tostring(stanza)); |
63 return; | 63 return; |
64 end | 64 end |