Review at  https://gerrit.osmocom.org/3001

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.

  (remote=127.0.0.1:2905<->local=127.0.0.1:60661)

Change-Id: Id3e32de19fe07ed5b19ee5e67494926a511266b5
---
M src/socket.c
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/01/3001/1

diff --git a/src/socket.c b/src/socket.c
index 6fa05a8..b1cfd8f 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -608,11 +608,11 @@
        if (rc < 0)
                goto local_only;
 
-       return talloc_asprintf(ctx, "(%s:%s<->%s:%s)", hostbuf_r, portbuf_r,
+       return talloc_asprintf(ctx, "(remote=%s:%s<->local=%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, "(remote=NULL<->local=%s:%s)", hostbuf_l, 
portbuf_l);
 }
 
 #endif /* HAVE_SYS_SOCKET_H */

-- 
To view, visit https://gerrit.osmocom.org/3001
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id3e32de19fe07ed5b19ee5e67494926a511266b5
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofm...@sysmocom.de>

Reply via email to