summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/socket.c4
-rw-r--r--tests/socket/socket_test.c6
2 files changed, 5 insertions, 5 deletions
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 */
diff --git a/tests/socket/socket_test.c b/tests/socket/socket_test.c
index b56d50c0..11ef8da4 100644
--- a/tests/socket/socket_test.c
+++ b/tests/socket/socket_test.c
@@ -49,7 +49,7 @@ static int test_sockinit(void)
* as apparently that won't work on FreeBSD if there's only one
* address (e.g. 127.0.0.1) assigned to the entire system, like
* the Osmocom FreeBSD build slaves */
- OSMO_ASSERT(!strncmp(name, "(NULL<->", 7));
+ OSMO_ASSERT(!strncmp(name, "(r=NULL<->", 9));
talloc_free(name);
/* expect it to be blocking */
rc = fcntl(fd, F_GETFL);
@@ -87,7 +87,7 @@ static int test_sockinit2(void)
* as apparently that won't work on FreeBSD if there's only one
* address (e.g. 127.0.0.1) assigned to the entire system, like
* the Osmocom FreeBSD build slaves */
- OSMO_ASSERT(!strncmp(name, "(NULL<->", 7));
+ OSMO_ASSERT(!strncmp(name, "(r=NULL<->", 9));
talloc_free(name);
/* expect it to be blocking */
rc = fcntl(fd, F_GETFL);
@@ -116,7 +116,7 @@ static int test_sockinit2(void)
/* For some reason, on the jenkins.osmocom.org build slave with
* FreeBSD 10 inside a jail, it fails. Works fine on laforge's
* FreeBSD 10 or 11 VM at home */
- OSMO_ASSERT(!strncmp(name, "(127.0.0.1:53<->127.0.0.1", 25));
+ OSMO_ASSERT(!strncmp(name, "(r=127.0.0.1:53<->l=127.0.0.1", 29));
#endif
talloc_free(name);