summaryrefslogtreecommitdiff
path: root/src/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/udp.c')
-rw-r--r--src/udp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/udp.c b/src/udp.c
index 58e7637..e3dc6ff 100644
--- a/src/udp.c
+++ b/src/udp.c
@@ -121,6 +121,10 @@ int writeUdpSocket(sock_udp_t *src, sock_udp_t *dst, void *address, int len)
int addrlen;
int size;
+#ifdef DEBUG_LOST_PACKET
+ if( rand() % DEBUG_LOST_PACKET == 0 )return size;
+#endif
+
addrlen = sizeof(src->sockAddr);
assert( src != NULL );