aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/9pserve.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-03-18 19:22:01 +0000
committerrsc <devnull@localhost>2005-03-18 19:22:01 +0000
commit3a6f92eed18aa29c7f5f2e150c0fb81adaa3a6bf (patch)
treeaf9c166b71f5a4ef08b7c3b954659a762fa1c4de /src/cmd/9pserve.c
parent5a79cf71c28b4c5f4e05a570fe97b79de283bbe7 (diff)
downloadplan9port-3a6f92eed18aa29c7f5f2e150c0fb81adaa3a6bf.tar.gz
plan9port-3a6f92eed18aa29c7f5f2e150c0fb81adaa3a6bf.tar.bz2
plan9port-3a6f92eed18aa29c7f5f2e150c0fb81adaa3a6bf.zip
add verbose9pserve environment variable; fix afid ref
Diffstat (limited to 'src/cmd/9pserve.c')
-rw-r--r--src/cmd/9pserve.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cmd/9pserve.c b/src/cmd/9pserve.c
index c7c362ed..a6cb11f7 100644
--- a/src/cmd/9pserve.c
+++ b/src/cmd/9pserve.c
@@ -127,9 +127,12 @@ extern int _threaddebuglevel;
void
threadmain(int argc, char **argv)
{
- char *file;
+ char *file, *x;
int fd;
+ x = getenv("verbose9pserve");
+ if(x)
+ verbose = atoi(x);
ARGBEGIN{
default:
usage();
@@ -338,6 +341,8 @@ connthread(void *arg)
err(m, "unknown fid");
continue;
}
+ if(m->afid)
+ m->afid->ref++;
m->fid = fidnew(m->tx.fid);
if(puthash(c->fid, m->tx.fid, m->fid) < 0){
err(m, "duplicate fid");