Do not send roster push when we're not connected -> fixed leak

This commit is contained in:
HanzZ 2011-07-21 00:54:04 +02:00
parent 775cbbeb76
commit 2a09696a8a
2 changed files with 4 additions and 1 deletions

View file

@ -25,6 +25,6 @@ default_avatar=catmelonhead.jpg
#backend_config=backend_logging.cfg # log4cxx/log4j logging configuration file for backends
[database]
type = sqlite3 # or "none" without database backend
type = none # or "none" without database backend
database = test.sql
prefix=icq

View file

@ -74,6 +74,9 @@ void RosterManager::setBuddy(Buddy *buddy) {
}
void RosterManager::sendBuddyRosterPush(Buddy *buddy) {
if (!m_user->isConnected())
return;
Swift::RosterPayload::ref payload = Swift::RosterPayload::ref(new Swift::RosterPayload());
Swift::RosterItemPayload item;
item.setJID(buddy->getJID().toBare());