From 9f95eb6fd6e5fa8a3be78f8b1b85310f50e49380 Mon Sep 17 00:00:00 2001 From: rsc Date: Mon, 18 Jul 2005 00:05:41 +0000 Subject: [PATCH] announce to networks --- src/lib9/post9p.c | 13 ++++++++----- 1 file 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()){