plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit 54eacd0b20a4018abcf16eab490e0f553267239a
parent 9e36143a34451aba972b157a53160f1badff9ceb
Author: rsc <devnull@localhost>
Date:   Fri, 30 Dec 2005 17:07:24 +0000

try to make ftp work

Diffstat:
Msrc/cmd/hget.c | 13++++---------
1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/src/cmd/hget.c b/src/cmd/hget.c @@ -856,23 +856,18 @@ doftp(URL *u, URL *px, Range *r, Out *out, long mtime) int pid, ctl, data, rv; Waitmsg *w; char msg[64]; - char conndir[NETPATHLEN]; - char *p; /* untested, proxy dosn't work with ftp (I think) */ if(px->host == nil){ - ctl = dial(netmkaddr(u->host, tcpdir, u->port), 0, conndir, 0); + ctl = dial(netmkaddr(u->host, tcpdir, u->port), 0, 0, 0); } else { - ctl = dial(netmkaddr(px->host, tcpdir, px->port), 0, conndir, 0); + ctl = dial(netmkaddr(px->host, tcpdir, px->port), 0, 0, 0); } if(ctl < 0) return Error; - if(net == nil){ - p = strrchr(conndir, '/'); - *p = 0; - snprint(tcpdir, sizeof(tcpdir), conndir); - } + if(net == nil) + strcpy(tcpdir, "tcp"); initibuf();