aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2023-12-08 18:24:39 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2023-12-08 18:43:31 +0100
commitd4407a7f32186d4647dc887a0cb0e30db027fbae (patch)
tree5264d3af7cd0d601b7885527782391638d7b579d
parenta7650de412009e8cb43dab29e56cb8f2411fcd6d (diff)
stream_cli: osmo_stream_cli_get_sockname() now returns the full set of addresses
This is used by API callers, and internally to log connected/disconnected events. Related: SYS#5581 Change-Id: I249ee7cad824cf971faabe06d10de2426c1b0c8b
-rw-r--r--TODO-RELEASE3
-rw-r--r--src/stream_cli.c5
2 files changed, 5 insertions, 3 deletions
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 2346129..ecfd3ae 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -7,4 +7,5 @@
# If any interfaces have been added since the last public release: c:r:a + 1.
# If any interfaces have been removed or changed since the last public release: c:r:0.
#library what description / commit summary line
-libosmocore >1.9.0 working osmo_sock_init2_multiaddr2() without setting flag OSMO_SOCK_F_BIND \ No newline at end of file
+libosmocore >1.9.0 working osmo_sock_init2_multiaddr2() without setting flag OSMO_SOCK_F_BIND
+libosmocore >1.9.0 use osmo_sock_multiaddr_get_name_buf()
diff --git a/src/stream_cli.c b/src/stream_cli.c
index 4f2963d..1b9994c 100644
--- a/src/stream_cli.c
+++ b/src/stream_cli.c
@@ -685,9 +685,10 @@ void *osmo_stream_cli_get_data(struct osmo_stream_cli *cli)
* \returns Socket description or NULL in case of error */
char *osmo_stream_cli_get_sockname(const struct osmo_stream_cli *cli)
{
- static char buf[OSMO_SOCK_NAME_MAXLEN];
+ static char buf[OSMO_STREAM_MAX_ADDRS * OSMO_SOCK_NAME_MAXLEN];
- osmo_sock_get_name_buf(buf, OSMO_SOCK_NAME_MAXLEN, osmo_stream_cli_get_fd(cli));
+ osmo_sock_multiaddr_get_name_buf(buf, sizeof(buf),
+ osmo_stream_cli_get_fd(cli), cli->proto);
return buf;
}