summaryrefslogtreecommitdiff
path: root/opentracker.c
diff options
context:
space:
mode:
Diffstat (limited to 'opentracker.c')
-rw-r--r--opentracker.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/opentracker.c b/opentracker.c
index 8a39bde..af336aa 100644
--- a/opentracker.c
+++ b/opentracker.c
@@ -156,7 +156,7 @@ static ssize_t header_complete(char *request, ssize_t byte_count) {
156 return 0; 156 return 0;
157} 157}
158 158
159static void handle_dead(const int64 sock) { 159static void handle_dead(const int64_t sock) {
160 struct http_data *cookie = io_getcookie(sock); 160 struct http_data *cookie = io_getcookie(sock);
161 if (cookie) { 161 if (cookie) {
162 size_t i; 162 size_t i;
@@ -171,7 +171,7 @@ static void handle_dead(const int64 sock) {
171 io_close(sock); 171 io_close(sock);
172} 172}
173 173
174static void handle_read(const int64 sock, struct ot_workstruct *ws) { 174static void handle_read(const int64_t sock, struct ot_workstruct *ws) {
175 struct http_data *cookie = io_getcookie(sock); 175 struct http_data *cookie = io_getcookie(sock);
176 ssize_t byte_count = io_tryread(sock, ws->inbuf, G_INBUF_SIZE); 176 ssize_t byte_count = io_tryread(sock, ws->inbuf, G_INBUF_SIZE);
177 177
@@ -215,7 +215,7 @@ static void handle_read(const int64 sock, struct ot_workstruct *ws) {
215 } 215 }
216} 216}
217 217
218static void handle_write(const int64 sock) { 218static void handle_write(const int64_t sock) {
219 struct http_data *cookie = io_getcookie(sock); 219 struct http_data *cookie = io_getcookie(sock);
220 size_t i; 220 size_t i;
221 int chunked = 0; 221 int chunked = 0;
@@ -227,7 +227,7 @@ static void handle_write(const int64 sock) {
227 227
228 for (i = 0; i < cookie->batches; ++i) { 228 for (i = 0; i < cookie->batches; ++i) {
229 if (cookie->batch[i].bytesleft) { 229 if (cookie->batch[i].bytesleft) {
230 int64 res = iob_send(sock, cookie->batch + i); 230 int64_t res = iob_send(sock, cookie->batch + i);
231 231
232 if (res == -3) { 232 if (res == -3) {
233 handle_dead(sock); 233 handle_dead(sock);
@@ -250,9 +250,9 @@ static void handle_write(const int64 sock) {
250 handle_dead(sock); 250 handle_dead(sock);
251} 251}
252 252
253static void handle_accept(const int64 serversocket) { 253static void handle_accept(const int64_t serversocket) {
254 struct http_data *cookie; 254 struct http_data *cookie;
255 int64 sock; 255 int64_t sock;
256 ot_ip6 ip; 256 ot_ip6 ip;
257 uint16 port; 257 uint16 port;
258 tai6464 t; 258 tai6464 t;
@@ -305,7 +305,7 @@ static void *server_mainloop(void *args) {
305 random_bytes(ws.rand48_state, sizeof(ws.rand48_state)); 305 random_bytes(ws.rand48_state, sizeof(ws.rand48_state));
306 306
307 for (;;) { 307 for (;;) {
308 int64 sock; 308 int64_t sock;
309 309
310 io_wait(); 310 io_wait();
311 311
@@ -339,7 +339,7 @@ static void *server_mainloop(void *args) {
339} 339}
340 340
341static int64_t ot_try_bind(ot_ip6 ip, uint16_t port, PROTO_FLAG proto) { 341static int64_t ot_try_bind(ot_ip6 ip, uint16_t port, PROTO_FLAG proto) {
342 int64 sock = proto == FLAG_TCP ? socket_tcp6() : socket_udp6(); 342 int64_t sock = proto == FLAG_TCP ? socket_tcp6() : socket_udp6();
343 343
344#ifdef _DEBUG 344#ifdef _DEBUG
345 { 345 {