plugins/mod_smacks.lua
changeset 12051 81858fd6f198
parent 12050 372ec5cd0f51
child 12052 f087bfd021ad
equal deleted inserted replaced
12050:372ec5cd0f51 12051:81858fd6f198
   604 		-- ...they are what is now left in the outgoing stanza queue
   604 		-- ...they are what is now left in the outgoing stanza queue
   605 		-- We have to use the send of "session" because we don't want to add our resent stanzas
   605 		-- We have to use the send of "session" because we don't want to add our resent stanzas
   606 		-- to the outgoing queue again
   606 		-- to the outgoing queue again
   607 		local queue = original_session.outgoing_stanza_queue;
   607 		local queue = original_session.outgoing_stanza_queue;
   608 		session.log("debug", "resending all unacked stanzas that are still queued after resume, #queue = %d", #queue);
   608 		session.log("debug", "resending all unacked stanzas that are still queued after resume, #queue = %d", #queue);
       
   609 		-- FIXME Which session is it that the queue filter sees?
   609 		session.resending_unacked = true;
   610 		session.resending_unacked = true;
       
   611 		original_session.resending_unacked = true;
   610 		for i=1,#queue do
   612 		for i=1,#queue do
   611 			session.send(queue[i]);
   613 			session.send(queue[i]);
   612 		end
   614 		end
   613 		session.resending_unacked = nil;
   615 		session.resending_unacked = nil;
       
   616 		original_session.resending_unacked = nil;
   614 		session.log("debug", "all stanzas resent, now disabling send() in this migrated session, #queue = %d", #queue);
   617 		session.log("debug", "all stanzas resent, now disabling send() in this migrated session, #queue = %d", #queue);
   615 		function session.send(stanza) -- luacheck: ignore 432
   618 		function session.send(stanza) -- luacheck: ignore 432
   616 			migrated_session_log("error", "Tried to send stanza on old session migrated by smacks resume (maybe there is a bug?): %s", tostring(stanza));
   619 			migrated_session_log("error", "Tried to send stanza on old session migrated by smacks resume (maybe there is a bug?): %s", tostring(stanza));
   617 			return false;
   620 			return false;
   618 		end
   621 		end