pespin has uploaded this change for review.
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
---
M src/stream_cli.c
1 file changed, 16 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/85/35285/1
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 @@
* \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;
}
To view, visit change 35285. To unsubscribe, or for help writing mail filters, visit settings.