Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7666


Ignore:
Timestamp:
Nov 24, 2010, 4:13:04 PM (14 years ago)
Author:
smerkli
Message:

further corrections.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/masterserver/src/modules/masterserver/MasterServer.cc

    r7662 r7666  
    159159        std::list<packet::ServerInformation>::iterator i;
    160160
     161        /* packet holder */
     162        ENetPacket *reply;
     163
    161164        /* loop through list elements */
    162165        for( i = mainlist.serverlist.begin(); i != mainlist.serverlist.end(); ++i )
     
    169172
    170173          /* create packet from it */
    171           ENetPacket * reply = enet_packet_create( tosend,
     174          reply = enet_packet_create( tosend,
    172175            strlen( tosend ) + 1,
    173176            ENET_PACKET_FLAG_RELIABLE);
     
    179182          enet_host_flush( this->server );
    180183        }
     184
     185        /* send end-of-list packet */
     186        reply = enet_packet_create( MSPROTO_SERVERLIST_END,
     187          MSPROTO_SERVERLIST_END_LEN + 1,
     188          ENET_PACKET_FLAG_RELIABLE );
     189
     190        enet_peer_send( event->peer, 0, reply );
     191
     192        /* One could just use enet_host_service() instead. */
     193        enet_host_flush( this->server );
     194
    181195      }
    182196    }
Note: See TracChangeset for help on using the changeset viewer.