(file) Return to MessageQueueService.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/MessageQueueService.cpp between version 1.20 and 1.21

version 1.20, 2002/02/18 22:52:26 version 1.21, 2002/02/19 18:21:14
Line 122 
Line 122 
  
    msg->op = get_op();    msg->op = get_op();
    msg->op->_request.insert_first(msg);    msg->op->_request.insert_first(msg);
      msg->op->_op_dest = this;
   
  
    _incoming.insert_last_wait(msg->op);    _incoming.insert_last_wait(msg->op);
    msg->op->_client_sem.wait();    msg->op->_client_sem.wait();
Line 144 
Line 143 
  
 } }
  
 void MessageQueueService::default_async_callback(AsyncOpNode *op,  
                                                  MessageQueueService *mq,  
                                                  void *parm)  
 {  
    PEGASUS_ASSERT(op != 0 && mq != 0 );  
    op->complete();  
    return;  
 }  
   
   
   
 PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL MessageQueueService::_req_proc(void * parm) PEGASUS_THREAD_RETURN PEGASUS_THREAD_CDECL MessageQueueService::_req_proc(void * parm)
 { {
    Thread *myself = reinterpret_cast<Thread *>(parm);    Thread *myself = reinterpret_cast<Thread *>(parm);
Line 500 
Line 488 
 } }
  
  
 Boolean MessageQueueService::SendAsync(AsyncRequest *request,  Boolean MessageQueueService::SendAsync(AsyncOpNode *op,
                                          Uint32 destination,
                                        void (*callback)(AsyncOpNode *,                                        void (*callback)(AsyncOpNode *,
                                                         MessageQueueService *,                                                          MessageQueue *,
                                                         void *))                                                         void *))
 { {
      PEGASUS_ASSERT(op != 0 && callback != 0 );
  
    return true;     // get the queue handle for the destination
      if ( 0 == (op->_op_dest = MessageQueue::lookup(destination)))
         return false;
   
      op->_flags &= ASYNC_OPFLAGS_CALLBACK;
      op->_flags &= ~(ASYNC_OPFLAGS_FIRE_AND_FORGET | ASYNC_OPSTATE_COMPLETE);
   
   
      return  _meta_dispatcher->route_async(op);
 } }
  
  
Line 525 
Line 523 
       op->_request.insert_first(msg);       op->_request.insert_first(msg);
    }    }
  
    op->_state &= ~ASYNC_OPSTATE_COMPLETE;  
    op->_flags &= ASYNC_OPFLAGS_FIRE_AND_FORGET;    op->_flags &= ASYNC_OPFLAGS_FIRE_AND_FORGET;
      op->_flags &= ~(ASYNC_OPFLAGS_CALLBACK | ASYNC_OPFLAGS_SIMPLE_STATUS | ASYNC_OPSTATE_COMPLETE);
    op->put_response(0);    op->put_response(0);
  
      // get the queue handle for the destination
      if ( 0 == (op->_op_dest = MessageQueue::lookup(msg->dest)))
         return false;
   
    // now see if the meta dispatcher will take it    // now see if the meta dispatcher will take it
    return  _meta_dispatcher->route_async(op);    return  _meta_dispatcher->route_async(op);
 } }
Line 549 
Line 551 
    }    }
  
    request->block = true;    request->block = true;
    request->op->_state &= ~ASYNC_OPSTATE_COMPLETE;     request->op->_state &= ~(ASYNC_OPSTATE_COMPLETE | ASYNC_OPFLAGS_CALLBACK);
    request->op->put_response(0);    request->op->put_response(0);
  
    // first link it on our pending list     // get the queue handle for the destination
    // _pending.insert_last_wait(request->op);     if ( 0 == (request->op->_op_dest = MessageQueue::lookup(request->dest)))
         return 0;
   
  
    // now see if the meta dispatcher will take it    // now see if the meta dispatcher will take it
  


Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2