diff options
author | cinap_lenrek <cinap_lenrek@localhost> | 2011-05-01 07:07:32 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@localhost> | 2011-05-01 07:07:32 +0000 |
commit | db7290d79e86abfdab490e793073a4936c8e1e5f (patch) | |
tree | dac3dcff6e2dfa616a99a03732013345038eb51b /sys/src/cmd/cwfs/net.c | |
parent | 064bce08419857817e0b851ea43ae66b2aee0843 (diff) |
cwfs: fix network listener, relay auth errors. boot(8): split bootargs only on first ! char, prepare /net so cwfs can announce 9fs
Diffstat (limited to 'sys/src/cmd/cwfs/net.c')
-rw-r--r-- | sys/src/cmd/cwfs/net.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/src/cmd/cwfs/net.c b/sys/src/cmd/cwfs/net.c index ed6abe280..e8df40302 100644 --- a/sys/src/cmd/cwfs/net.c +++ b/sys/src/cmd/cwfs/net.c @@ -54,19 +54,18 @@ neti(void *v) Network *net; net = v; - print("net%di\n", net->ctlrno); -Listen: - if((lisfd = listen(net->anndir, net->lisdir)) < 0){ - print("listen %s failed: %r\n", net->anndir); - return; - } + if(chatty) + print("net%di\n", net->ctlrno); for(;;) { + if((lisfd = listen(net->anndir, net->lisdir)) < 0){ + fprint(2, "listen %s failed: %r\n", net->anndir); + break; + } /* got new call on lisfd */ if((accfd = accept(lisfd, net->lisdir)) < 0){ - print("accept %d (from %s) failed: %r\n", - lisfd, net->lisdir); + fprint(2, "accept %d (from %s) failed: %r\n", lisfd, net->lisdir); close(lisfd); - goto Listen; + continue; } nci = getnetconninfo(net->lisdir, accfd); srvchan(accfd, nci->raddr); @@ -97,10 +96,11 @@ netinit(void) if(net->dialstr == nil) continue; if((net->annfd = announce(net->dialstr, net->anndir)) < 0){ - print("can't announce %s: %r", net->dialstr); + fprint(2, "can't announce %s: %r", net->dialstr); net->dialstr = nil; continue; } - print("netinit: announced on %s\n", net->dialstr); + if(chatty) + print("netinit: announced on %s\n", net->dialstr); } } |