Use unsigned long in zlib functions

This commit is contained in:
Erik Ekman 2007-02-04 16:06:53 +00:00
parent c5317fe388
commit 2ee543f053

View File

@ -53,13 +53,15 @@ tunnel_tun(int tun_fd, int dns_fd)
{ {
char out[64*1024]; char out[64*1024];
char in[64*1024]; char in[64*1024];
size_t outlen; unsigned long outlen;
unsigned long inlen;
size_t read; size_t read;
read = read_tun(tun_fd, in, sizeof(in)); read = read_tun(tun_fd, in, sizeof(in));
if(read > 0) { if(read > 0) {
outlen = sizeof(out); outlen = sizeof(out);
compress2(out, &outlen, in, read, 9); inlen = read;
compress2(out, &outlen, in, inlen, 9);
dns_handle_tun(dns_fd, out, outlen); dns_handle_tun(dns_fd, out, outlen);
} }
@ -71,13 +73,15 @@ tunnel_dns(int tun_fd, int dns_fd)
{ {
char out[64*1024]; char out[64*1024];
char in[64*1024]; char in[64*1024];
size_t outlen; unsigned long outlen;
unsigned long inlen;
size_t read; size_t read;
read = dns_read(dns_fd, in, sizeof(in)); read = dns_read(dns_fd, in, sizeof(in));
if (read > 0) { if (read > 0) {
outlen = sizeof(out); outlen = sizeof(out);
uncompress(out, &outlen, in, read); inlen = read;
uncompress(out, &outlen, in, inlen);
write_tun(tun_fd, out, outlen); write_tun(tun_fd, out, outlen);
if (!dns_sending()) if (!dns_sending())