1 diff -Nur a/redir.c b/redir.c
2 --- a/redir.c 2005-10-22 23:20:05.235901424 -0400
3 +++ b/redir.c 2005-10-22 23:22:20.198384008 -0400
8 - unsigned int * bufsize,
9 + unsigned int * bufsizeout,
17 - *bufsize = (unsigned int)atol(optarg);
18 + *bufsizeout = (unsigned int)atol(optarg);
23 unsigned long bytes_in = 0;
24 unsigned long bytes_out = 0;
25 unsigned int start_time, end_time;
27 + char* buf = malloc(bufsize);
29 /* Record start time */
30 start_time = (unsigned int) time(NULL);
34 if(FD_ISSET(insock, &c_iofds)) {
35 - if((bytes = read(insock, buf, sizeof(buf))) <= 0)
36 + if((bytes = read(insock, buf, bufsize)) <= 0)
43 if(FD_ISSET(outsock, &c_iofds)) {
44 - if((bytes = read(outsock, buf, sizeof(buf))) <= 0)
45 + if((bytes = read(outsock, buf, bufsize)) <= 0)
47 /* if we're correcting for PASV on ftp redirections, then
48 fix buf and bytes to have the new address, among other
50 syslog(LOG_NOTICE, "disconnect %d secs, %ld in %ld out",
51 (end_time - start_time), bytes_in, bytes_out);