Diff

core/stanza_router.lua @ 774:4885c6e101b4

stanza_router: Fix for when clients don't specify priority in initial presence
author Matthew Wild <mwild1@gmail.com>
date Mon, 09 Feb 2009 13:48:11 +0000
parent 760:90ce865eebd8
child 785:31d5be1371cf
line wrap: on
line diff
--- a/core/stanza_router.lua	Mon Feb 09 13:41:05 2009 +0000
+++ b/core/stanza_router.lua	Mon Feb 09 13:48:11 2009 +0000
@@ -202,7 +202,7 @@
 					local priority = 0;
 					local recipients = {};
 					for _, session in pairs(user.sessions) do -- find resource with greatest priority
-						local p = session.priority;
+						local p = session.priority or -1;
 						if p > priority then
 							priority = p;
 							recipients = {session};