Index: utils.c =================================================================== --- utils.c (revision 272) +++ utils.c (revision 273) @@ -140,7 +140,7 @@ t = list; while (t) { - printf("List data: %lu => 0x%08x\n", (unsigned long int)t->key, (unsigned int)t->aux); + printf("List data: %lu => 0x%8p\n", (unsigned long int)t->key, t->aux); t = t->next; } } Index: forward.c =================================================================== --- forward.c (revision 272) +++ forward.c (revision 273) @@ -127,7 +127,7 @@ strcpy(buf, "NTLM "); len = ntlm_request(&tmp, credentials); if (len) { - to_base64(MEM(buf, unsigned char, 5), MEM(tmp, unsigned char, 0), len, BUFSIZE-5); + to_base64(MEM(buf, uint8_t, 5), MEM(tmp, uint8_t, 0), len, BUFSIZE-5); free(tmp); } @@ -215,7 +215,7 @@ len = ntlm_response(&tmp, challenge, len, credentials); if (len > 0) { strcpy(buf, "NTLM "); - to_base64(MEM(buf, unsigned char, 5), MEM(tmp, unsigned char, 0), len, BUFSIZE-5); + to_base64(MEM(buf, uint8_t, 5), MEM(tmp, uint8_t, 0), len, BUFSIZE-5); request->headers = hlist_mod(request->headers, "Proxy-Authorization", buf, 1); free(tmp); } else { Index: config.c =================================================================== --- config.c (revision 272) +++ config.c (revision 273) @@ -28,6 +28,7 @@ #include "config.h" #include "utils.h" +/* static const char *globals[] = { "Allow", "Deny", @@ -37,6 +38,7 @@ "SOCKS5User", "NTLMToBasic", "Tunnel" }; +*/ config_t config_open(const char *fname) { config_t rc; Index: ntlm.c =================================================================== --- ntlm.c (revision 272) +++ ntlm.c (revision 273) @@ -19,6 +19,7 @@ * */ +#include #include #include #include @@ -78,7 +79,7 @@ #ifdef PRId64 printf("NTLMv2:\n\t Nonce: %s\n\tTimestamp: %"PRId64"\n", tmp, tw); #else - printf("NTLMv2:\n\t Nonce: %s\n\tTimestamp: %lld\n", tmp, tw); + printf("NTLMv2:\n\t Nonce: %s\n\tTimestamp: %ld\n", tmp, tw); #endif free(tmp); } Index: http.c =================================================================== --- http.c (revision 272) +++ http.c (revision 273) @@ -518,6 +518,9 @@ } else length = (tmp == NULL || nobody ? 0 : atol(tmp)); + if (current == request && length == -1) + length = 0; + return length; } Index: direct.c =================================================================== --- direct.c (revision 272) +++ direct.c (revision 273) @@ -68,7 +68,7 @@ strcpy(buf, "NTLM "); len = ntlm_request(&tmp, creds); if (len) { - to_base64(MEM(buf, unsigned char, 5), MEM(tmp, unsigned char, 0), len, BUFSIZE-5); + to_base64(MEM(buf, uint8_t, 5), MEM(tmp, uint8_t, 0), len, BUFSIZE-5); free(tmp); } @@ -121,7 +121,7 @@ len = ntlm_response(&tmp, challenge, len, creds); if (len > 0) { strcpy(buf, "NTLM "); - to_base64(MEM(buf, unsigned char, 5), MEM(tmp, unsigned char, 0), len, BUFSIZE-5); + to_base64(MEM(buf, uint8_t, 5), MEM(tmp, uint8_t, 0), len, BUFSIZE-5); request->headers = hlist_mod(request->headers, "Authorization", buf, 1); free(tmp); } else { Index: main.c =================================================================== --- main.c (revision 272) +++ main.c (revision 273) @@ -1437,7 +1437,7 @@ * after the first kill) and a "forced" one (user insists and * killed us twice). */ - while (quit < 1 || tc != tj) { + while (quit == 0 || (tc != tj && quit < 2)) { struct thread_arg_s *data; struct sockaddr_in caddr; struct timeval tv;