changeset 41:0381d5d38c37

mod_privacy: fix bug where priority was nil and compared to a number (Thx flo for reporting!)
author Thilo Cestonaro <thilo@cestona.ro>
date Thu, 15 Oct 2009 09:41:13 +0200 (2009-10-15)
parents 4c4daa1f8ae7
children bbb3d3a90a70
files mod_privacy/mod_privacy.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_privacy/mod_privacy.lua	Wed Oct 14 00:52:58 2009 +0200
+++ b/mod_privacy/mod_privacy.lua	Thu Oct 15 09:41:13 2009 +0200
@@ -353,7 +353,7 @@
             module:log("debug", "Never block communications from one of a user's resources to another.");
             return; -- from one of a user's resource to another => HANDS OFF!
         end 
-    
+
 		local idx;
 		local list;
 		local item;
@@ -465,7 +465,7 @@
 			local session_;
 			if bare_sessions[node.."@"..host] ~= nil then
 				for resource, session_ in pairs(bare_sessions[node.."@"..host].sessions) do
-					if session_.priority > prio then
+					if session_.priority ~= nil and session_.priority > prio then
 						session = session_;
 						prio = session_.priority;
 					end