Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9555 in orxonox.OLD for branches/proxy/src


Ignore:
Timestamp:
Jul 28, 2006, 12:09:56 PM (18 years ago)
Author:
patrick
Message:

cleaned up a smaller memory leak

Location:
branches/proxy/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/message_manager.cc

    r9542 r9555  
    253253      {
    254254
     255        PRINTF(0)("<<< MessageManager: got msg with type: %i, from sender %i, to rec: %i\n", messageType, senderId, destinationId);
    255256      // call the handler function and handle errors
    256257        if ( !(*(messageHandlerMap[(MessageType)messageType].cb))( (MessageType)messageType, data + i, messageLength,
     
    271272          incomingMessageQueue.push_back( msg );
    272273        }
    273         PRINTF(0)("<<< MessageManager: got msg with type: %i, from sender %i, to rec: %i\n", messageType, senderId, destinationId);
    274274      }
    275275      // or else forward the message to the other servers
  • branches/proxy/src/lib/network/proxy/proxy_control.cc

    r9553 r9555  
    104104bool ProxyControl::messageHandlerNewClient( MessageType messageType, byte * data, int dataLength, void * someData, int senderId, int destinationId  )
    105105{
    106   int userId = 0;
    107106  // body data length correct?
    108107  if ( dataLength != INTSIZE )
     
    112111  }
    113112  // read the userId fromt he message body
    114   assert( Converter::byteArrayToInt( data, &userId) == INTSIZE );
     113  int newClientId = 0;
     114  assert( Converter::byteArrayToInt( data, &newClientId) == INTSIZE );
    115115
    116   PRINTF(0)("Got Signal: from %i new player arrived with userId: %i\n", senderId, userId);
     116  PRINTF(0)("Got Signal: from %i new player arrived with userId: %i\n", senderId, newClientId);
    117117  // part for the master server
    118118  if( SharedNetworkData::getInstance()->isMasterServer())
    119119  {
    120120    // we now create the new player ship and stuff...
    121     NetworkGameManager::getInstance()->signalNewPlayer(userId);
     121    NetworkGameManager::getInstance()->signalNewPlayer(newClientId);
    122122  }
    123123  else if(SharedNetworkData::getInstance()->isProxyServerActive())
  • branches/proxy/src/world_entities/spawning_point.cc

    r9541 r9555  
    207207void SpawningPoint::sendRespawnMessage( int uniqueId )
    208208{
    209   byte * buf = new byte[2*INTSIZE];
     209  byte buf[2*INTSIZE];
    210210
    211211  assert( Converter::intToByteArray( this->getUniqueID(), buf, INTSIZE ) == INTSIZE );
Note: See TracChangeset for help on using the changeset viewer.