(svn r15969) -Codechange: make the list of broadcast addresses virtually unlimited.

This commit is contained in:
rubidium
2009-04-07 19:06:36 +00:00
parent d66827b289
commit f6e27e7274
7 changed files with 38 additions and 57 deletions

View File

@@ -371,14 +371,12 @@ void NetworkUDPCloseAll()
/* Broadcast to all ips */
static void NetworkUDPBroadCast(NetworkUDPSocketHandler *socket)
{
uint i;
for (i = 0; !StrEmpty(_broadcast_list[i].GetHostname()); i++) {
for (NetworkAddress *addr = _broadcast_list.Begin(); addr != _broadcast_list.End(); addr++) {
Packet p(PACKET_UDP_CLIENT_FIND_SERVER);
DEBUG(net, 4, "[udp] broadcasting to %s", _broadcast_list[i].GetHostname());
DEBUG(net, 4, "[udp] broadcasting to %s", addr->GetHostname());
socket->SendPacket(&p, &_broadcast_list[i]);
socket->SendPacket(&p, addr);
}
}