Logo Search packages:      
Sourcecode: kmess version File versions

void P2PApplicationBase::testUnAckedMessages ( bool  sendError  )  [private]

Test if there are still unacked messages.

Parameters:
sendError Whether to send an error to the client back as well.

Definition at line 2266 of file p2papplicationbase.cpp.

References P2PApplicationBase::UnAckedMessage::ackSessionID, Application::getContactHandle(), P2PApplicationBase::UnAckedMessage::messageID, P2PApplicationBase::UnAckedMessage::messageType, and P2PApplicationBase::UnAckedMessage::totalSize.

Referenced by endApplicationLater(), and slotCleanup().

{
  // Check if there are still unacked messages.
  if( ! outgoingMessages_.isEmpty() )
  {
    uint unackedCount = outgoingMessages_.count();

    if( unackedCount == 1 )
    {
      UnAckedMessage *unAcked = outgoingMessages_.at(0);

      // More simple debug statement for most used case.
      kWarning() << "there is still " << unackedCount << " unacked message "
                    "(type="      << unAcked->messageType <<
                    " ackSid="    << unAcked->ackSessionID <<
                    " totalsize=" << unAcked->totalSize <<
                    " state="     << waitingState_ <<
                    " contact="   << getContactHandle() <<
                    " class="     << metaObject()->className() <<
                    " session="   << getSessionID() << ")";
    }
    else
    {
      kWarning() << "there are still " << unackedCount << " unacked messages "
                    "(state="   << waitingState_ <<
                    " contact=" << getContactHandle() <<
                    " class="   << metaObject()->className() <<
                    " session=" << getSessionID() << ")";

      foreach( UnAckedMessage *unAcked, outgoingMessages_ )
      {
        kWarning() << "Message "    << unAcked->messageID << " is unacked "
                      "(type="      << unAcked->messageType <<
                      " ackSid="    << unAcked->ackSessionID <<
                      " totalsize=" << unAcked->totalSize << ").";

      }
    }
  }
}


Generated by  Doxygen 1.6.0   Back to index