Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

void tmTransactionService::OnAttachReply ( tmTransaction aTrans  )  [protected]

Pulls the queueID out of the ATTACH_REPLY message and stores it in the proper tm_queue_mapping object. Calls DispatchStoredMessages() to make sure we send any messages that have been waiting on the ATTACH_REPLY. Also calls the OnAttachReply() method for the observer of the queue.

Definition at line 332 of file tmTransactionService.cpp.

References DispatchStoredMessages(), tmTransaction::GetMessage(), tmTransaction::GetQueueID(), tmTransaction::GetStatus(), and tmVector::Size().


  // if we attached, store the queue's ID
  if (aTrans->GetStatus() >= 0) {

    PRUint32 size = mQueueMaps.Size();
    tm_queue_mapping *qmap = nsnull;
    for (PRUint32 index = 0; index < size; index++) {
      qmap = (tm_queue_mapping*) mQueueMaps[index];
      if (qmap && 
          PL_strcmp(qmap->joinedQueueName, (char*) aTrans->GetMessage()) == 0) {

        // set the ID in the mapping
        qmap->queueID = aTrans->GetQueueID();
        // send any stored messges to the queue

  // notify the observer we have attached (or didn't)
  ipcITransactionObserver *observer = 
    (ipcITransactionObserver *)PL_HashTableLookup(mObservers, 
  if (observer)
    observer->OnAttachReply(aTrans->GetQueueID(), aTrans->GetStatus());

Generated by  Doxygen 1.6.0   Back to index