Changeset - 02df69b8318f
[Not reviewed]
0 1 0
Darchigh - 13 years ago 2013-01-18 17:42:19
Darchigh@gmail.com
Make Spectrum2 send full roster after receiving empty RemoteRoster-Payload
1 file changed with 9 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/rostermanager.cpp
Show inline comments
 
@@ -280,6 +280,15 @@ void RosterManager::handleRemoteRosterResponse(boost::shared_ptr<Swift::RosterPa
 

	
 
	LOG4CXX_INFO(logger, m_user->getJID().toString() << ": This server supports remote roster protoXEP");
 
	m_supportRemoteRoster = true;
 

	
 
	//If we receive empty RosterPayload initiate full RosterPush
 
	if(payload->getItems().empty()){
 
		LOG4CXX_INFO(logger, "Received empty Roster. Pushing full Roster.");
 
		for(std::map<std::string, Buddy *, std::less<std::string>, boost::pool_allocator< std::pair<std::string, Buddy *> > >::const_iterator c_it = m_buddies.begin();
 
				c_it != m_buddies.end(); c_it++) {
 
			sendBuddyRosterPush(c_it->second);
 
		}
 
	}
 
	return;
 

	
 
	BOOST_FOREACH(const Swift::RosterItemPayload &item, payload->getItems()) {
0 comments (0 inline, 0 general)