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;
|
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()){
|
||||||
|
|
Loading…
Reference in a new issue