diff options
author | rsc <devnull@localhost> | 2005-07-18 00:05:41 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-07-18 00:05:41 +0000 |
commit | 9f95eb6fd6e5fa8a3be78f8b1b85310f50e49380 (patch) | |
tree | 74e8bbc18e60270fea3505ec5e593ebf5cb86004 /src | |
parent | 16ea7713b5a20cfb8482d4a65f40760cc67c999b (diff) | |
download | plan9port-9f95eb6fd6e5fa8a3be78f8b1b85310f50e49380.tar.gz plan9port-9f95eb6fd6e5fa8a3be78f8b1b85310f50e49380.tar.bz2 plan9port-9f95eb6fd6e5fa8a3be78f8b1b85310f50e49380.zip |
announce to networks
Diffstat (limited to 'src')
-rw-r--r-- | src/lib9/post9p.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/lib9/post9p.c b/src/lib9/post9p.c index 44c09431..37b6b80f 100644 --- a/src/lib9/post9p.c +++ b/src/lib9/post9p.c @@ -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()){ |