Changeset 6024 for branches/newapi

Show
Ignore:
Timestamp:
01/11/08 07:57:15 (11 months ago)
Author:
erijo
Message:

Save the name of the eventpipe that an event is sent to so that it can
be sent to the next queue in that pipe the next time.

Location:
branches/newapi/licq/src/event
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/newapi/licq/src/event/eventmanagerimpl.cpp

    r6017 r6024  
    6464 
    6565void LicqDaemon::EventManagerImpl::sendEvent(const std::string& name, 
    66                                              boost::shared_ptr<Licq::Event> event) 
     66                                             Licq::Event::Ptr event) 
    6767{ 
    6868  Licq::ReadLocker locker(&myEventPipesMutex); 
    6969 
    70   EventPipes::iterator pipe = myEventPipes.find(name); 
     70  std::string queueName; 
     71  if (!event->getProperty("_name", &queueName)) 
     72  { 
     73    queueName = name; 
     74    event->setProperty("_name", queueName); 
     75  } 
     76 
     77  EventPipes::iterator pipe = myEventPipes.find(queueName); 
    7178  if (pipe == myEventPipes.end()) 
    7279  { 
    73     myLog.warning(tr("No queues registered for %1%") % name); 
     80    myLog.warning(tr("No queues registered for %1%") % queueName); 
    7481    return; 
    7582  } 
  • branches/newapi/licq/src/event/eventmanagerimpl.h

    r6017 r6024  
    4646  void unregisterQueue(Licq::EventQueue* queue); 
    4747 
    48   void sendEvent(const std::string& name, 
    49                  boost::shared_ptr<Licq::Event> event); 
     48  void sendEvent(const std::string& name, Licq::Event::Ptr event); 
    5049 
    5150private: