=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ftp/fetch.c,v retrieving revision 1.79 retrieving revision 1.80 diff -c -r1.79 -r1.80 *** src/usr.bin/ftp/fetch.c 2008/06/26 05:42:20 1.79 --- src/usr.bin/ftp/fetch.c 2008/07/08 21:07:57 1.80 *************** *** 1,4 **** ! /* $OpenBSD: fetch.c,v 1.79 2008/06/26 05:42:20 ray Exp $ */ /* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */ /*- --- 1,4 ---- ! /* $OpenBSD: fetch.c,v 1.80 2008/07/08 21:07:57 martynas Exp $ */ /* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */ /*- *************** *** 31,37 **** */ #if !defined(lint) && !defined(SMALL) ! static const char rcsid[] = "$OpenBSD: fetch.c,v 1.79 2008/06/26 05:42:20 ray Exp $"; #endif /* not lint and not SMALL */ /* --- 31,37 ---- */ #if !defined(lint) && !defined(SMALL) ! static const char rcsid[] = "$OpenBSD: fetch.c,v 1.80 2008/07/08 21:07:57 martynas Exp $"; #endif /* not lint and not SMALL */ /* *************** *** 353,361 **** --- 353,363 ---- if (portnum != NULL) *portnum++ = '\0'; + #ifndef SMALL if (debug) fprintf(ttyout, "host %s, port %s, path %s, save as %s.\n", host, portnum, path, savefile); + #endif /* !SMALL */ memset(&hints, 0, sizeof(hints)); hints.ai_family = family; *************** *** 558,565 **** --- 560,569 ---- while (len > 0 && (buf[len-1] == '\r' || buf[len-1] == '\n')) buf[--len] = '\0'; + #ifndef SMALL if (debug) fprintf(ttyout, "received '%s'\n", buf); + #endif /* !SMALL */ cp = strchr(buf, ' '); if (cp == NULL) *************** *** 616,623 **** --- 620,629 ---- buf[--len] = '\0'; if (len == 0) break; + #ifndef SMALL if (debug) fprintf(ttyout, "received '%s'\n", buf); + #endif /* !SMALL */ /* Look for some headers */ cp = buf; *************** *** 974,984 **** --- 980,992 ---- dir = NULL; } } + #ifndef SMALL if (debug) fprintf(ttyout, "user %s:%s host %s port %s dir %s file %s\n", username, pass ? "XXXX" : NULL, host, portnum, dir, file); + #endif /* !SMALL */ /* * Set up the connection. *************** *** 1276,1283 **** --- 1284,1293 ---- l = asprintf(&connstr, "CONNECT %s:%s HTTP/1.1\n\n", host, port); if (l == -1) errx(1, "Could not allocate memory to assemble connect string!"); + #ifndef SMALL if (debug) printf("%s", connstr); + #endif /* !SMALL */ if (write(socket, connstr, l) != l) err(1, "Could not send connect string"); read(socket, &buf, sizeof(buf)); /* only proxy header XXX: error handling? */