summaryrefslogtreecommitdiff
path: root/opentracker.c
diff options
context:
space:
mode:
authorerdgeist <>2008-12-06 18:46:00 +0000
committererdgeist <>2008-12-06 18:46:00 +0000
commit08c71627839a9134367db354c8255f7a720e1ff3 (patch)
treeb429abf6b3c26c7f851b522f5d4fb6797ad02d29 /opentracker.c
parenta4ed31d517f77a21afe12918a9cb256489daac74 (diff)
Renamed OT_FLAG to OT_PEERFLAG to make code easier to read
Introduced READ16/32 and WRITE16/32 makros to abstract loading/storing from unaligned addresses away on cpu's that can actually load/store everywhere Removed all unnecessary memmoves, especially where it only moved 6 bytes in inner loop. I replaced them with WRITE16/32(READ16/32()) makros
Diffstat (limited to 'opentracker.c')
-rw-r--r--opentracker.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/opentracker.c b/opentracker.c
index f8587c9..d506085 100644
--- a/opentracker.c
+++ b/opentracker.c
@@ -165,7 +165,7 @@ static void handle_accept( const int64 serversocket ) {
165 io_wantread( i ); 165 io_wantread( i );
166 166
167 memset( h, 0, sizeof( struct http_data ) ); 167 memset( h, 0, sizeof( struct http_data ) );
168 memmove( h->ip, ip, sizeof( ip ) ); 168 WRITE32(h->ip,0,READ32(ip,0));
169 169
170 stats_issue_event( EVENT_ACCEPT, FLAG_TCP, ntohl(*(uint32_t*)ip)); 170 stats_issue_event( EVENT_ACCEPT, FLAG_TCP, ntohl(*(uint32_t*)ip));
171 171