ttry to make ftp work - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 54eacd0b20a4018abcf16eab490e0f553267239a
(DIR) parent 9e36143a34451aba972b157a53160f1badff9ceb
(HTM) Author: rsc <devnull@localhost>
Date: Fri, 30 Dec 2005 17:07:24 +0000
ttry to make ftp work
Diffstat:
M src/cmd/hget.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
---
(DIR) diff --git a/src/cmd/hget.c b/src/cmd/hget.c
t@@ -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();