From: Ian Jackson Date: Thu, 23 Oct 2014 18:04:57 +0000 (+0100) Subject: udp: Print `&' in address descriptions only if multiple sockets X-Git-Tag: proposed.ipv6-polypath-fixes.v1~11 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=secnet.git;a=commitdiff_plain;h=bfc34affaf5e80fe6a85bbcc4c302005154b4531 udp: Print `&' in address descriptions only if multiple sockets Signed-off-by: Ian Jackson --- diff --git a/udp.c b/udp.c index 06acf33..70928a8 100644 --- a/udp.c +++ b/udp.c @@ -54,7 +54,7 @@ static const char *udp_addr_to_string(void *commst, const struct comm_addr *ca) assert(ix>=0 && ixn_socks); snprintf(sbuf, sizeof(sbuf), "udp:%s%s-%s", iaddr_to_string(&socks->socks[ix].addr), - ca->ix<0 ? "&" : "", + ca->ix<0 && socks->n_socks>1 ? "&" : "", iaddr_to_string(&ca->ia)); return sbuf; }