diff options
author | erdgeist <> | 2006-12-06 18:36:14 +0000 |
---|---|---|
committer | erdgeist <> | 2006-12-06 18:36:14 +0000 |
commit | a53d14c46f035338d9247f22e31c19dfab0398f0 (patch) | |
tree | 2a70354ba0222426e83d0df779b8d12846a062cd /opentracker.c | |
parent | ad472597c569568bad0526d116b601dfcb36638c (diff) |
blocking socket blocks...
Diffstat (limited to 'opentracker.c')
-rw-r--r-- | opentracker.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/opentracker.c b/opentracker.c index bd47a24..1c0d558 100644 --- a/opentracker.c +++ b/opentracker.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include "fmt.h" | 7 | #include "fmt.h" |
8 | #include "iob.h" | 8 | #include "iob.h" |
9 | #include "str.h" | 9 | #include "str.h" |
10 | #include <string.h> | ||
10 | #include <sys/types.h> | 11 | #include <sys/types.h> |
11 | #include <sys/stat.h> | 12 | #include <sys/stat.h> |
12 | #include <unistd.h> | 13 | #include <unistd.h> |
@@ -182,7 +183,7 @@ e404: | |||
182 | } | 183 | } |
183 | 184 | ||
184 | int main() { | 185 | int main() { |
185 | int s=socket_tcp6b(); | 186 | int s=socket_tcp6(); |
186 | uint32 scope_id; | 187 | uint32 scope_id; |
187 | char ip[16]; | 188 | char ip[16]; |
188 | uint16 port; | 189 | uint16 port; |
@@ -253,6 +254,7 @@ int main() { | |||
253 | buffer_putnlflush(buffer_2); | 254 | buffer_putnlflush(buffer_2); |
254 | io_close(i); | 255 | io_close(i); |
255 | } else if (l>0) { | 256 | } else if (l>0) { |
257 | buffer_puts(buffer_2,"Garr"); | ||
256 | array_catb(&h->r,buf,l); | 258 | array_catb(&h->r,buf,l); |
257 | if (array_failed(&h->r)) { | 259 | if (array_failed(&h->r)) { |
258 | httperror(h,"500 Server Error","request too long."); | 260 | httperror(h,"500 Server Error","request too long."); |