diff options
| author | charles forsyth <charles.forsyth@gmail.com> | 2015-06-13 16:34:09 +0100 |
|---|---|---|
| committer | charles forsyth <charles.forsyth@gmail.com> | 2015-06-13 16:34:09 +0100 |
| commit | 62d7827bc358c000db9ff48fe61bd28ac352a884 (patch) | |
| tree | 3369436e1f4ccfabd4bd5a58632d26934b868688 /appl/charon/http.b | |
| parent | 15cdcc9295cbd45a03f77559b9de402033858a41 (diff) | |
mkfiles/mkfile-Linux-386
Diffstat (limited to 'appl/charon/http.b')
| -rw-r--r-- | appl/charon/http.b | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/appl/charon/http.b b/appl/charon/http.b index d1208091..05d2396c 100644 --- a/appl/charon/http.b +++ b/appl/charon/http.b @@ -52,6 +52,7 @@ U: Url; S: String; C: Ctype; T: StringIntTab; +DI: Dial; CU: CharonUtils; Netconn, ByteSource, Header, config, Nameval : import CU; @@ -251,6 +252,7 @@ init(cu: CharonUtils) U = load Url Url->PATH; if (U != nil) U->init(); + DI = cu->DI; C = cu->C; T = load StringIntTab StringIntTab->PATH; # D = load Date CU->loadpath(Date->PATH); @@ -280,13 +282,12 @@ connect(nc: ref Netconn, bs: ref ByteSource) if(config.httpproxy.port != "") dialport = config.httpproxy.port; } - addr := "tcp!" + dialhost + "!" + dialport; + addr := DI->netmkaddr(dialhost, "net", dialport); err := ""; if(dbg) sys->print("http %d: dialing %s\n", nc.id, addr); - rv: int; - (rv, nc.conn) = sys->dial(addr, nil); - if(rv < 0) { + nc.conn = DI->dial(addr, nil); + if(nc.conn == nil) { syserr := sys->sprint("%r"); if(S->prefix("cs: dialup", syserr)) err = syserr[4:]; @@ -352,7 +353,7 @@ vers = 3; } } -constate(msg: string, conn: Sys->Connection) +constate(msg: string, conn: ref Dial->Connection) { fd := conn.dfd; fdfd := -1; |
