Changeset 8203
- Timestamp:
- Apr 7, 2011, 4:31:37 PM (14 years ago)
- Location:
- code/branches/masterserver2/src/libraries/network
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/masterserver2/src/libraries/network/MasterServer.cc
r8202 r8203 108 108 /* get an iterator */ 109 109 std::list<ServerListElem>::iterator i; 110 111 if( mainlist.serverlist.size() == 0 ) 112 return; 110 113 111 114 /* loop through list elements */ … … 113 116 != mainlist.serverlist.end(); ++i ) 114 117 { 115 if( mainlist.serverlist.size() != 0 &&(*i).peer &&118 if( (*i).peer && 116 119 ((*i).peer->state == ENET_PEER_STATE_DISCONNECTED || 117 120 (*i).peer->state == ENET_PEER_STATE_ZOMBIE )) 118 121 { mainlist.delServerByName( (*i).ServerInfo.getServerName() ); 119 122 COUT(2) << "someone timed out.\n"; 123 break; 120 124 } 121 125 } -
code/branches/masterserver2/src/libraries/network/ServerList.cc
r8202 r8203 61 61 if( (*i).ServerInfo.getServerName() == name ) 62 62 { /* found this name, remove and quit */ 63 this->serverlist. erase( i);63 this->serverlist.clear(); 64 64 return true; 65 65 }
Note: See TracChangeset
for help on using the changeset viewer.