From 5b55394cdc4f3ab1daa784291f8b66b5c0c419de Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Thu, 8 Mar 2007 01:24:47 +0000 Subject: Port is a short, not a long --- opentracker.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'opentracker.c') diff --git a/opentracker.c b/opentracker.c index e286a24..656764d 100644 --- a/opentracker.c +++ b/opentracker.c @@ -586,8 +586,8 @@ static void handle_udp4( int64 serversocket ) { numwant = 200; left = ntohl( inpacket[64/4] ); event = ntohl( inpacket[80/4] ); - port = ntohl( inpacket[96/4] ); - hash = (ot_hash*)inpacket+(16/4); + port = ntohs( *(unsigned short*)( static_inbuf + 96 ) ); + hash = (ot_hash*)( static_inbuf + 16 ); OT_SETIP( &peer, remoteip ); OT_SETPORT( &peer, &port ); -- cgit v1.2.3