Changeset 9509 in orxonox.OLD for branches/proxy
- Timestamp:
- Jul 27, 2006, 3:55:22 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/message_manager.cc
r9508 r9509 324 324 void MessageManager::sendMessage( MessageType messageType, byte * data, int dataLength, RecieverType recieverType, int reciever, MessagePriority messagePriority ) 325 325 { 326 326 // go through all outgoing message queues and add the message if its appropriate 327 327 for ( MessageQueue::iterator it = this->outgoingMessageQueue.begin(); it != this->outgoingMessageQueue.end(); it++ ) 328 328 { 329 // check for every node if the message is for it also 329 330 if ( 330 331 recieverType == RT_ALL_ME || … … 332 333 recieverType == RT_USER && it->first == reciever || 333 334 recieverType == RT_NOT_USER && it->first != reciever || 334 recieverType == RT_SERVER && getNetworkStream()->isUserMasterServer( it->first ) || 335 recieverType == RT_SERVER && getNetworkStream()->isUserProxyServerActive( it->first ) 335 recieverType == RT_SERVER && getNetworkStream()->isUserMasterServer( it->first ) 336 336 ) 337 337 { … … 342 342 msg.length = dataLength; 343 343 msg.messageType = messageType; 344 msg.number = newNumber++;344 msg.number = this->newNumber++; 345 345 msg.priority = messagePriority; 346 346 347 347 it->second.messages.push_back( msg ); 348 348 } 349 } 350 349 350 // relay server special handling 351 if( SharedNetworkData::getInstance()->isMasterServer() && SharedNetworkData::getInstance()->isUserProxyServerActive(it->first)) 352 { 353 NetworkMessage msg; 354 355 msg.data = new byte[dataLength]; 356 memcpy( msg.data, data, dataLength ); 357 msg.length = dataLength; 358 msg.messageType = messageType; 359 msg.number = this->newNumber++; 360 msg.priority = messagePriority; 361 362 it->second.messages.push_back( msg ); 363 } 364 } 365 366 367 // if the message is also for myself, handle it here 351 368 if ( recieverType == RT_ALL_ME ) 352 369 {
Note: See TracChangeset
for help on using the changeset viewer.