aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/hget.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-12-30 17:07:24 +0000
committerrsc <devnull@localhost>2005-12-30 17:07:24 +0000
commit54eacd0b20a4018abcf16eab490e0f553267239a (patch)
tree449ba546dc7b6e1c9114814bfbffbeb41a72e055 /src/cmd/hget.c
parent9e36143a34451aba972b157a53160f1badff9ceb (diff)
downloadplan9port-54eacd0b20a4018abcf16eab490e0f553267239a.tar.gz
plan9port-54eacd0b20a4018abcf16eab490e0f553267239a.tar.bz2
plan9port-54eacd0b20a4018abcf16eab490e0f553267239a.zip
try to make ftp work
Diffstat (limited to 'src/cmd/hget.c')
-rw-r--r--src/cmd/hget.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/cmd/hget.c b/src/cmd/hget.c
index 582933be..66fb60da 100644
--- 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();