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;
Waitmsg *w;
if((ns = getns()) == nil)
return -1;
s = smprint("unix!%s/%s", ns, name);
free(ns);
if(strchr(name, '!')) /* assume is already network address */
s = strdup(name);
else{
if((ns = getns()) == nil)
return -1;
s = smprint("unix!%s/%s", ns, name);
free(ns);
}
if(s == nil)
return -1;
switch(fork()){