From 1f82d0aecfa30884426fdcf583b32826527c639c Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Wed, 21 Jun 2017 22:54:46 +0200 Subject: osmo_sock_get_name(): clearly indicate local and remote In a string like 127.0.0.1:2905<->127.0.0.1:60661 it is hard to tell which is the local part. I'd have expected it on the left, but it is actually on the right. To avoid doubt and bypass bikesheds on which side should be what, clearly mark the two sides as remote and local. (r=127.0.0.1:2905<->l=127.0.0.1:60661) Change-Id: I43dcc6a1906429bd0955fd7fe2eb5b8495b592d8 --- src/socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/socket.c') diff --git a/src/socket.c b/src/socket.c index b74edd43..28d9b1c4 100644 --- a/src/socket.c +++ b/src/socket.c @@ -607,11 +607,11 @@ char *osmo_sock_get_name(void *ctx, int fd) if (rc < 0) goto local_only; - return talloc_asprintf(ctx, "(%s:%s<->%s:%s)", hostbuf_r, portbuf_r, + return talloc_asprintf(ctx, "(r=%s:%s<->l=%s:%s)", hostbuf_r, portbuf_r, hostbuf_l, portbuf_l); local_only: - return talloc_asprintf(ctx, "(NULL<->%s:%s)", hostbuf_l, portbuf_l); + return talloc_asprintf(ctx, "(r=NULL<->l=%s:%s)", hostbuf_l, portbuf_l); } #endif /* HAVE_SYS_SOCKET_H */ -- cgit v1.2.3