diff options
| author | Charles.Forsyth <devnull@localhost> | 2009-03-20 19:00:27 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2009-03-20 19:00:27 +0000 |
| commit | a60fa48ce2f27a689f276bea9538b5db2b74ff86 (patch) | |
| tree | a4481fed48337acdd6d2bd786eca5bf757364c46 /tools/libstyx/styxserver.c | |
| parent | 390cfcfb235f8ef61e0467216902c4d718f51ad0 (diff) | |
20090320-1900
Diffstat (limited to 'tools/libstyx/styxserver.c')
| -rw-r--r-- | tools/libstyx/styxserver.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/libstyx/styxserver.c b/tools/libstyx/styxserver.c index d0bf1c2c..34257349 100644 --- a/tools/libstyx/styxserver.c +++ b/tools/libstyx/styxserver.c @@ -114,7 +114,7 @@ newclient(Styxserver *server, int fd) c->state = 0; c->fids = nil; c->uname = strdup(eve); - c->aname = strdup(eve); + c->aname = strdup(""); c->next = server->clients; server->clients = c; if(server->ops->newclient) @@ -167,7 +167,7 @@ rd(Client *c, Fcall *r) { if(c->nc > 0){ /* last convM2S consumed nc bytes */ c->nread -= c->nc; - if(c->nread < 0){ + if((int)c->nread < 0){ r->ename = "negative size in rd"; return -1; } @@ -903,7 +903,7 @@ run(Client *c) break; case Tattach: if(Debug) - fprint(2, "Tattach %d %s\n", f.fid, f.uname[0] ? f.uname : c->uname); + fprint(2, "Tattach %d %s %s\n", f.fid, f.uname[0] ? f.uname : c->uname, f.aname[0]? f.aname: c->aname); if(fp){ f.type = Rerror; f.ename = "fid in use"; @@ -1065,3 +1065,9 @@ styxqid(int path, int isdir) q.type = 0; return q; } + +void +styxsetowner(char *name) +{ + eve = name; +} |
