Comparison

mod_cache_c2s_caps/mod_cache_c2s_caps.lua @ 3455:1ef702d30b6b

mod_cache_c2s_caps: Add a missing return when the hash is wrong.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 22 Jan 2019 15:38:52 +0100
parent 3454:c424bfb927b1
child 3456:b85622b577ad
comparison
equal deleted inserted replaced
3454:c424bfb927b1 3455:1ef702d30b6b
34 34
35 local node, ver = node_query:match("([^#]+)#([^#]+)"); 35 local node, ver = node_query:match("([^#]+)#([^#]+)");
36 local hash = calculate_hash(query) 36 local hash = calculate_hash(query)
37 if ver ~= hash then 37 if ver ~= hash then
38 origin.log("debug", "Wrong hash for disco#info: %s ~= %s", ver, hash); 38 origin.log("debug", "Wrong hash for disco#info: %s ~= %s", ver, hash);
39 return;
39 end 40 end
40 41
41 origin.caps_cache = query; 42 origin.caps_cache = query;
42 origin.log("info", "Stored caps %s", ver); 43 origin.log("info", "Stored caps %s", ver);
43 module:fire_event("c2s-capabilities-changed", { origin = origin }); 44 module:fire_event("c2s-capabilities-changed", { origin = origin });