Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2945 for code


Ignore:
Timestamp:
May 1, 2009, 3:16:12 PM (16 years ago)
Author:
scheusso
Message:

fixed some bugs

Location:
code/branches/netp2/src/network
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/netp2/src/network/FunctionCallManager.cc

    r2944 r2945  
    3535
    3636void FunctionCallManager::addCallStatic(uint32_t functionID, uint32_t clientID, MultiType* mt1, MultiType* mt2, MultiType* mt3, MultiType* mt4, MultiType* mt5)
    37 {
     37{  
    3838  if(clientMap_.find(clientID)==clientMap_.end())
    3939  {
    40     clientMap_[clientID] = new packet::FunctionCalls;
    41     clientMap_[clientID]->setClientID(clientID);
     40    FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls;
     41    FunctionCallManager::clientMap_[clientID]->setClientID(clientID);
    4242  }
    43   clientMap_[clientID]->addCallStatic(functionID, mt1, mt2, mt3, mt4, mt5);
     43  FunctionCallManager:: clientMap_[clientID]->addCallStatic(functionID, mt1, mt2, mt3, mt4, mt5);
    4444}
    4545
     
    4848  if(clientMap_.find(clientID)==clientMap_.end())
    4949  {
    50     clientMap_[clientID] = new packet::FunctionCalls;
    51     clientMap_[clientID]->setClientID(clientID);
     50    FunctionCallManager::clientMap_[clientID] = new packet::FunctionCalls;
     51    FunctionCallManager::clientMap_[clientID]->setClientID(clientID);
    5252  }
    53   clientMap_[clientID]->addCallMember(functionID, objectID, mt1, mt2, mt3, mt4, mt5);
     53  FunctionCallManager::clientMap_[clientID]->addCallMember(functionID, objectID, mt1, mt2, mt3, mt4, mt5);
    5454}
    5555
     
    5757{
    5858  std::map<uint32_t, packet::FunctionCalls*>::iterator it;
    59   for (it = FunctionCallManager::clientMap_.begin(); it != FunctionCallManager::clientMap_.end(); )
     59  for (it = FunctionCallManager::clientMap_.begin(); it != FunctionCallManager::clientMap_.end(); it++ )
    6060  {
     61    assert(!FunctionCallManager::clientMap_.empty());
    6162    it->second->send();
    62     clientMap_.erase(it++);
    6363  }
     64  FunctionCallManager::clientMap_.clear();
    6465}
    6566
  • code/branches/netp2/src/network/packet/FunctionCalls.cc

    r2944 r2945  
    5252  data_=new uint8_t[ FUNCTIONCALLS_MEM_ALLOCATION ];
    5353  *(ENUM::Type *)(data_ + _PACKETID ) = ENUM::FunctionCalls;
     54  *(uint32_t*)(data_+sizeof(uint32_t)) = 0; // set nrOfCalls to 0
    5455}
    5556
Note: See TracChangeset for help on using the changeset viewer.