Software /
code /
prosody
Comparison
util/pubsub.lua @ 5315:abf1a926d0da
util.pubsub: Fix nil access error in get_subscriptions.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sat, 26 Jan 2013 03:54:18 +0500 |
parent | 5312:fdcd2ac7c22d |
child | 5320:518d864b2ab8 |
comparison
equal
deleted
inserted
replaced
5314:e5e480d73066 | 5315:abf1a926d0da |
---|---|
336 if subs then | 336 if subs then |
337 for jid, subscribed_nodes in pairs(subs) do | 337 for jid, subscribed_nodes in pairs(subs) do |
338 if node then -- Return only subscriptions to this node | 338 if node then -- Return only subscriptions to this node |
339 if subscribed_nodes[node] then | 339 if subscribed_nodes[node] then |
340 ret[#ret+1] = { | 340 ret[#ret+1] = { |
341 node = subscribed_node; | 341 node = subscribed_nodes[node]; |
342 jid = jid; | 342 jid = jid; |
343 subscription = node_obj.subscribers[jid]; | 343 subscription = node_obj.subscribers[jid]; |
344 }; | 344 }; |
345 end | 345 end |
346 else -- Return subscriptions to all nodes | 346 else -- Return subscriptions to all nodes |