Logo Search packages:      
Sourcecode: kmess version File versions  Download package

void DirectConnectionPool::clearPending (  ) 

Remove all connections from the list.

Definition at line 174 of file directconnectionpool.cpp.

References DirectConnectionBase::getRemoteIp(), and DirectConnectionBase::getRemotePort().

Referenced by slotConnectionEstablished().

{
#ifdef KMESSDEBUG_DIRECTCONNECTION_GENERAL
  kdDebug() << "DirectConnectionPool::clearPending() - Removing pending sockets." << endl;
#endif

  // Tell all other pending connections to abort
  QPtrListIterator<DirectConnectionBase> it(pendingConnections_);
  while( it.current() != 0 )
  {
    DirectConnectionBase *pendingConnection = it.current();

#ifdef KMESSDEBUG_DIRECTCONNECTION_GENERAL
      kdDebug() << "DirectConnectionPool::clearPending() - Deleting pending connection to peer "
                << pendingConnection->getRemoteIp() << ":" << pendingConnection->getRemotePort() << endl;
#endif

    pendingConnection->deleteLater();  // delete should not be called from a slot.
    ++it;
  }

  // Clear the list
  pendingConnections_.clear();
}


Generated by  Doxygen 1.6.0   Back to index