- Timestamp:
- Nov 24, 2010, 2:07:53 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/masterserver/src/libraries/network/WANDiscovery.cc
r7651 r7657 62 62 63 63 /* callback for the network reply poller */ 64 /* WORK MARK WORK WORK */ 65 /* NOTE implement protocol-specific part here. */ 66 int WANDiscovery::rhandler( char *addr, ENetEvent *ev ) 64 int rhandler( char *addr, ENetEvent *ev ) 67 65 { 66 /* error recognition */ 67 if( !ev || !ev->packet || !ev->packet->data ) 68 { COUT(2) << "Bad arguments received in WANDiscovery's reply handler.\n"; 69 return 0; 70 } 71 68 72 /* handle incoming data */ 69 73 /* if a list entry arrives add to list */ … … 81 85 82 86 /* add to list */ 83 this->servers_.push_back( toadd );87 WANDiscovery::getInstance().servers_.push_back( toadd ); 84 88 } 85 89 else if( !strncmp( (char*)ev->packet->data, MSPROTO_SERVERLIST_END, … … 97 101 98 102 /* send request to server */ 99 msc.sendRequest( MSPROTO_CLIENT " " MSPROTO_REQ_LIST );103 this->msc.sendRequest( MSPROTO_CLIENT " " MSPROTO_REQ_LIST ); 100 104 101 105 /* deal with replies */ 102 while( ! msc.pollForReply( WANDiscovery::rhandler ) )106 while( !(this->msc).pollForReply( rhandler ) ) 103 107 /* nothing */; 104 108
Note: See TracChangeset
for help on using the changeset viewer.