diff options
author | erdgeist <> | 2007-12-03 01:07:41 +0000 |
---|---|---|
committer | erdgeist <> | 2007-12-03 01:07:41 +0000 |
commit | 848a06a706b1661666f1923817ee99e9710a52d4 (patch) | |
tree | 580ea601618396d0fb395dadb748764eed5c4eee /ot_udp.c | |
parent | 9bc0d99c6273e845c98dad9f7fc202b695055c9c (diff) |
Drop ot_{byte,word,dword} and use uint{8,16,32}_t, also simplify includes
Diffstat (limited to 'ot_udp.c')
-rw-r--r-- | ot_udp.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -23,10 +23,10 @@ void handle_udp4( int64 serversocket ) { | |||
23 | ot_torrent *torrent; | 23 | ot_torrent *torrent; |
24 | ot_hash *hash = NULL; | 24 | ot_hash *hash = NULL; |
25 | char remoteip[4]; | 25 | char remoteip[4]; |
26 | ot_dword *inpacket = (ot_dword*)static_inbuf; | 26 | uint32_t *inpacket = (uint32_t*)static_inbuf; |
27 | ot_dword *outpacket = (ot_dword*)static_outbuf; | 27 | uint32_t *outpacket = (uint32_t*)static_outbuf; |
28 | ot_dword numwant, left, event; | 28 | uint32_t numwant, left, event; |
29 | ot_word port, remoteport; | 29 | uint16_t port, remoteport; |
30 | size_t r, r_out; | 30 | size_t r, r_out; |
31 | 31 | ||
32 | r = socket_recv4( serversocket, static_inbuf, sizeof( static_inbuf ), remoteip, &remoteport); | 32 | r = socket_recv4( serversocket, static_inbuf, sizeof( static_inbuf ), remoteip, &remoteport); |
@@ -59,7 +59,7 @@ void handle_udp4( int64 serversocket ) { | |||
59 | left = inpacket[64/4] | inpacket[68/4]; | 59 | left = inpacket[64/4] | inpacket[68/4]; |
60 | 60 | ||
61 | event = ntohl( inpacket[80/4] ); | 61 | event = ntohl( inpacket[80/4] ); |
62 | port = *(ot_word*)( static_inbuf + 96 ); | 62 | port = *(uint16_t*)( static_inbuf + 96 ); |
63 | hash = (ot_hash*)( static_inbuf + 16 ); | 63 | hash = (ot_hash*)( static_inbuf + 16 ); |
64 | 64 | ||
65 | OT_SETIP( &peer, remoteip ); | 65 | OT_SETIP( &peer, remoteip ); |