announce to networks

This commit is contained in:
rsc 2005-07-18 00:05:41 +00:00
parent 16ea7713b5
commit 9f95eb6fd6

View file

@ -8,11 +8,14 @@ post9pservice(int fd, char *name)
char *ns, *s; char *ns, *s;
Waitmsg *w; Waitmsg *w;
if((ns = getns()) == nil) if(strchr(name, '!')) /* assume is already network address */
return -1; s = strdup(name);
else{
s = smprint("unix!%s/%s", ns, name); if((ns = getns()) == nil)
free(ns); return -1;
s = smprint("unix!%s/%s", ns, name);
free(ns);
}
if(s == nil) if(s == nil)
return -1; return -1;
switch(fork()){ switch(fork()){