summaryrefslogtreecommitdiff
path: root/src/network/core
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-01-04 15:42:09 +0000
committerrubidium <rubidium@openttd.org>2007-01-04 15:42:09 +0000
commit81235fc16b6b3151d51317c00646d70b801be0ec (patch)
tree15909c0154fb98b80ddc92ff7ebb1a0b9cac437e /src/network/core
parentbd37b23bd273dab64ff773514c5df0ed5895239b (diff)
downloadopenttd-81235fc16b6b3151d51317c00646d70b801be0ec.tar.xz
(svn r7821) -Fix: be more strict about the socket from where packets arrive. Do not accept requests about the game server on the master/client socket, do not accept master server acks on the client/server socket, etc.
Diffstat (limited to 'src/network/core')
-rw-r--r--src/network/core/udp.c2
-rw-r--r--src/network/core/udp.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/network/core/udp.c b/src/network/core/udp.c
index badd9a532..2ae14d5fa 100644
--- a/src/network/core/udp.c
+++ b/src/network/core/udp.c
@@ -119,7 +119,7 @@ void NetworkUDPReceive(SOCKET udp)
p.next = NULL;
/* Handle the packet */
- NetworkHandleUDPPacket(&p, &client_addr);
+ NetworkHandleUDPPacket(udp, &p, &client_addr);
}
}
diff --git a/src/network/core/udp.h b/src/network/core/udp.h
index 3221e664f..f927c289c 100644
--- a/src/network/core/udp.h
+++ b/src/network/core/udp.h
@@ -17,10 +17,11 @@ void NetworkUDPReceive(SOCKET udp);
/**
* Function that is called for every received UDP packet.
+ * @param udp the socket the packet is received on
* @param packet the received packet
* @param client_addr the address of the sender of the packet
*/
-void NetworkHandleUDPPacket(Packet *p, struct sockaddr_in *client_addr);
+void NetworkHandleUDPPacket(SOCKET udp, Packet *p, struct sockaddr_in *client_addr);
///** Sending/receiving of (large) chuncks of UDP packets **////