mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
announce to networks
This commit is contained in:
parent
16ea7713b5
commit
9f95eb6fd6
1 changed files with 8 additions and 5 deletions
|
@ -8,11 +8,14 @@ post9pservice(int fd, char *name)
|
|||
char *ns, *s;
|
||||
Waitmsg *w;
|
||||
|
||||
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()){
|
||||
|
|
Loading…
Reference in a new issue