while(1) {
int i;
int len;
- int n;
+ int n;
#ifndef USE_POLL
struct timeval tv;
FD_ZERO(&fds);
}
free(req->path);
req->path = result;
-
+
incr = 0;
p = malloc(1);
p[0] = 0;
char* pth;
cbuf[0] = oldc;
req->path[j] = 0;
-
+
pth = req->path + incr;
-
+
if(strcmp(pth, "..") == 0) {
int k;
if(p[strlen(p) - 1] == '/') p[strlen(p) - 1] = 0;
p = cm_strcat3(tmp, pth, cbuf);
free(tmp);
}
-
+
incr = j + 1;
if(oldc == 0) break;
}
#define printf(...) tt_printf(__VA_ARGS__)
#define STDERR_LOG(...) tt_printf(__VA_ARGS__)
#elif defined(_MSC_VER)
-void STDERR_LOG(const char* format, ...){
+void STDERR_LOG(const char* format, ...) {
va_list args;
va_start(args, format);
vfprintf(stderr, format, args);
void tw_server_loop(void) {
int i;
#ifndef USE_POLL
- fd_set fdset;
- struct timeval tv;
+ fd_set fdset;
+ struct timeval tv;
#endif
#if defined(__MINGW32__) || defined(__HAIKU__) || defined(_MSC_VER)
struct thread_entry threads[2048];