Changeset 8301 in orxonox.OLD for branches/network
- Timestamp:
- Jun 9, 2006, 7:12:08 PM (19 years ago)
- Location:
- branches/network/src/lib/network
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/network/connection_monitor.h
r8068 r8301 14 14 #define N_PACKETS_FOR_PING 20 15 15 #define MSECS_TO_CALC_BWIDTH 1000 16 #define SECS_TO_TIMEOUT 1016 #define SECS_TO_TIMEOUT 30 17 17 18 18 class ConnectionMonitor : virtual public BaseObject -
branches/network/src/lib/network/network_game_manager.cc
r8273 r8301 71 71 { 72 72 delete MessageManager::getInstance(); 73 74 PlayerStats::deleteAllPlayerStats(); 73 75 } 74 76 -
branches/network/src/lib/network/player_stats.cc
r8245 r8301 228 228 229 229 230 231 void PlayerStats::deleteAllPlayerStats( ) 232 { 233 const std::list<BaseObject*> * list; 234 235 while ( (list = ClassList::getList( CL_PLAYER_STATS )) != NULL && list->begin() != list->end() ) 236 delete *list->begin(); 237 } 238 -
branches/network/src/lib/network/player_stats.h
r8245 r8301 60 60 static bool changeNickHandler( MessageId messageId, byte * data, int dataLength, void * someData, int userId ); 61 61 void shellNick( const std::string& newNick ); 62 63 static void deleteAllPlayerStats(); 62 64 63 65 private: -
branches/network/src/lib/network/synchronizeable.cc
r8273 r8301 83 83 for ( StateHistory::iterator it2 = it->begin(); it2 != it->end(); it2++ ) 84 84 { 85 delete [] (*it2)->data; 85 if ( (*it2)->data ) 86 { 87 delete [] (*it2)->data; 88 (*it2)->data = NULL; 89 } 86 90 delete *it2; 87 91 } … … 93 97 for ( StateHistory::iterator it2 = it->begin(); it2 != it->end(); it2++ ) 94 98 { 95 delete [] (*it2)->data; 99 if ( (*it2)->data ) 100 { 101 delete [] (*it2)->data; 102 (*it2)->data = NULL; 103 } 96 104 delete *it2; 97 105 } … … 160 168 (*it2)->data = NULL; 161 169 } 170 171 delete *it2; 162 172 } 163 173 sentStates[userId].erase( sentStates[userId].begin(), it ); … … 191 201 stateFrom = (*it); 192 202 193 StateHistoryEntry * stateTo = new StateHistoryEntry(); 194 203 StateHistoryEntry * stateTo = new StateHistoryEntry; 204 205 sentStates[userId].push_back( stateTo ); 206 195 207 stateTo->stateId = stateId; 196 208 stateTo->dataLength = neededSize; … … 241 253 } 242 254 243 sentStates[userId].push_back( stateTo );244 245 255 if ( i != neededSize ) 246 256 { … … 407 417 { 408 418 if ( (*it)->data ) 419 { 409 420 delete [] (*it)->data; 410 (*it)->data = NULL; 421 (*it)->data = NULL; 422 } 411 423 412 424 delete *it; … … 421 433 { 422 434 if ( (*it)->data ) 435 { 423 436 delete [] (*it)->data; 424 (*it)->data = NULL; 437 (*it)->data = NULL; 438 } 425 439 426 440 delete *it; … … 471 485 472 486 if ( (*delIt)->data ) 487 { 473 488 delete [] (*delIt)->data; 489 (*delIt)->data = NULL; 490 } 474 491 delete *delIt; 475 492 recvStates[userId].erase( delIt ); … … 540 557 541 558 if ( (*delIt)->data ) 559 { 542 560 delete [] (*delIt)->data; 561 (*delIt)->data = NULL; 562 } 543 563 delete *delIt; 544 564 sentStates[userId].erase( delIt );
Note: See TracChangeset
for help on using the changeset viewer.