Diff

plugins/mod_saslauth.lua @ 6302:76699a0ae4c4

mod_lastactivity, mod_legacyauth, mod_presence, mod_saslauth, mod_tls: Use the newer stanza:get_child APIs and optimize away some table lookups
author Kim Alvefur <zash@zash.se>
date Fri, 04 Jul 2014 22:52:34 +0200
parent 6038:b3ceb7627e27
child 6424:89c42aff8510
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua	Fri Jul 04 21:48:25 2014 +0200
+++ b/plugins/mod_saslauth.lua	Fri Jul 04 22:52:34 2014 +0200
@@ -284,7 +284,7 @@
 	local resource;
 	if stanza.attr.type == "set" then
 		local bind = stanza.tags[1];
-		resource = bind:child_with_name("resource");
+		resource = bind:get_child("resource");
 		resource = resource and #resource.tags == 0 and resource[1] or nil;
 	end
 	local success, err_type, err, err_msg = sm_bind_resource(origin, resource);