From d0c0f54bdb5840c1f71d49561438fa5d3bd10ff2 Mon Sep 17 00:00:00 2001 From: Charles Forsyth Date: Mon, 20 Jul 2015 21:33:51 +0100 Subject: connection is now reference not value --- appl/charon/file.b | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'appl/charon/file.b') diff --git a/appl/charon/file.b b/appl/charon/file.b index 1a5947c1..6662b151 100644 --- a/appl/charon/file.b +++ b/appl/charon/file.b @@ -39,6 +39,7 @@ gethdr(nc: ref Netconn, bs: ref ByteSource) u := bs.req.url; f := u.path; hdr := Header.new(); + nc.conn = ref Dial->Connection; nc.conn.dfd = sys->open(f, sys->OREAD); if(nc.conn.dfd == nil) { if(dbg) @@ -127,8 +128,6 @@ defaultport(nil: string) : int closeconn(nc: ref Netconn) { - nc.conn.dfd = nil; - nc.conn.cfd = nil; - nc.conn.dir = ""; + nc.conn = nil; nc.connected = 0; } -- cgit v1.2.3