aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/faces/plumb.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-02-11 22:35:38 +0000
committerrsc <devnull@localhost>2006-02-11 22:35:38 +0000
commit00d75e0eaefc3d52a6bb631e4747da2b88e7c393 (patch)
tree22442f206af78a40ab03d3d52f74f53f70a6ced6 /src/cmd/faces/plumb.c
parent0c7c441e9033e523b96b474cdbee6b63410805f9 (diff)
downloadplan9port-00d75e0eaefc3d52a6bb631e4747da2b88e7c393.tar.gz
plan9port-00d75e0eaefc3d52a6bb631e4747da2b88e7c393.tar.bz2
plan9port-00d75e0eaefc3d52a6bb631e4747da2b88e7c393.zip
more changes
Diffstat (limited to 'src/cmd/faces/plumb.c')
-rw-r--r--src/cmd/faces/plumb.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/cmd/faces/plumb.c b/src/cmd/faces/plumb.c
index 1807fd38..4d246b5c 100644
--- a/src/cmd/faces/plumb.c
+++ b/src/cmd/faces/plumb.c
@@ -45,24 +45,23 @@ attr(Face *f)
void
showmail(Face *f)
{
+ char buf[256];
Plumbmsg pm;
Plumbattr a;
- char *s;
if(showfd<0 || f->str[Sshow]==nil || f->str[Sshow][0]=='\0')
return;
- s = emalloc(strlen("/mail/fs")+1+strlen(f->str[Sshow]));
- sprint(s,"/mail/fs/%s",f->str[Sshow]);
+ snprint(buf, sizeof buf, "Mail/%s", f->str[Sshow]);
pm.src = "faces";
pm.dst = "showmail";
- pm.wdir = "/mail/fs";
+ pm.wdir = "/";
pm.type = "text";
a.name = "digest";
a.value = f->str[Sdigest];
a.next = nil;
pm.attr = &a;
- pm.ndata = strlen(s);
- pm.data = s;
+ pm.ndata = strlen(buf);
+ pm.data = buf;
plumbsendtofid(showfd, &pm);
}
@@ -203,12 +202,9 @@ nextface(void)
delete(m->data, value(m->attr, "digest", nil));
else if(strcmp(t, "new") != 0)
fprint(2, "faces: unknown plumb message type %s\n", t);
- else for(i=0; i<nmaildirs; i++) { /* XXX */
- if(strncmp(m->data,"/mail/fs/",strlen("/mail/fs/")) == 0)
- m->data += strlen("/mail/fs/");
+ else for(i=0; i<nmaildirs; i++)
if(strncmp(m->data, maildirs[i], strlen(maildirs[i])) == 0)
goto Found;
- }
plumbfree(m);
continue;