lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

June 2023

  • 1 participants
  • 2480 discussions
[S] Change in libosmo-netif[master]: stream: set name to sockname by default
by pespin 16 Jun '23

16 Jun '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33337 ) Change subject: stream: set name to sockname by default ...................................................................... stream: set name to sockname by default Change-Id: I17ef699dab72c1b613708070d22e9f040b0fe069 --- M src/stream.c 1 file changed, 39 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/37/33337/1 diff --git a/src/stream.c b/src/stream.c index 0f97c28..3843cbf 100644 --- a/src/stream.c +++ b/src/stream.c @@ -271,6 +271,8 @@ struct osmo_stream_cli { char *name; + /* whether the name set in "name" is internally generated dynamicalli (_set_name() was not called): */ + bool name_dynamic; enum osmo_stream_mode mode; union { struct osmo_fd ofd; @@ -510,6 +512,12 @@ if (cli->mode == OSMO_STREAM_MODE_OSMO_FD && llist_empty(&cli->tx_queue)) osmo_fd_write_disable(&cli->ofd); + /* If user didn't set a name, (re-)set a dynamic default one based on socket info: */ + if (!cli->name || cli->name_dynamic) { + cli->name_dynamic = true; + osmo_talloc_replace_string(cli, &cli->name, osmo_sock_get_name2_c(cli, fd)); + } + LOGSCLI(cli, LOGL_DEBUG, "connection established\n"); cli->state = STREAM_CLI_STATE_CONNECTED; switch (cli->sk_domain) { @@ -649,6 +657,7 @@ */ void osmo_stream_cli_set_name(struct osmo_stream_cli *cli, const char *name) { + cli->name_dynamic = false; osmo_talloc_replace_string(cli, &cli->name, name); } @@ -1139,6 +1148,8 @@ struct osmo_stream_srv_link { struct osmo_fd ofd; + /* whether the name set in "name" is internally generated dynamicalli (_set_name() was not called): */ + bool name_dynamic; char *name; char *addr[OSMO_STREAM_MAX_ADDRS]; uint8_t addrcnt; @@ -1247,6 +1258,7 @@ */ void osmo_stream_srv_link_set_name(struct osmo_stream_srv_link *link, const char *name) { + link->name_dynamic = false; osmo_talloc_replace_string(link, &link->name, name); } @@ -1478,6 +1490,12 @@ link->ofd.fd = -1; return -EIO; } + + /* If user didn't set a name, (re-)set a dynamic default one based on socket info: */ + if (!link->name || link->name_dynamic) { + link->name_dynamic = true; + osmo_talloc_replace_string(link, &link->name, talloc_strdup(link, osmo_stream_srv_link_get_sockname(link))); + } return 0; } @@ -1511,6 +1529,8 @@ struct osmo_stream_srv { struct osmo_stream_srv_link *srv; + /* whether the name set in "name" is internally generated dynamicalli (_set_name() was not called): */ + bool name_dynamic; char *name; enum osmo_stream_mode mode; union { @@ -1688,6 +1708,9 @@ conn->data = data; INIT_LLIST_HEAD(&conn->tx_queue); + conn->name_dynamic = true; + conn->name = osmo_sock_get_name2_c(conn, fd); + if (osmo_fd_register(&conn->ofd) < 0) { LOGSSRV(conn, LOGL_ERROR, "could not register FD\n"); talloc_free(conn); @@ -1717,7 +1740,6 @@ conn->mode = OSMO_STREAM_MODE_OSMO_IO; conn->srv = link; - conn->name = talloc_strdup(conn, name); conn->iofd = osmo_iofd_setup(conn, fd, name, OSMO_IO_FD_MODE_READ_WRITE, &srv_ioops, conn); if (!conn->iofd) { talloc_free(conn); @@ -1725,6 +1747,13 @@ } conn->data = data; + if (name) { + conn->name = talloc_strdup(conn, name); + } else { + conn->name_dynamic = true; + conn->name = osmo_sock_get_name2_c(conn, fd); + } + if (osmo_iofd_register(conn->iofd, fd) < 0) { LOGSSRV(conn, LOGL_ERROR, "could not register FD %d\n", fd); talloc_free(conn); -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33337 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I17ef699dab72c1b613708070d22e9f040b0fe069 Gerrit-Change-Number: 33337 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in libosmo-netif[master]: stream: Allow setting name printed during logging
by pespin 16 Jun '23

16 Jun '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33336 ) Change subject: stream: Allow setting name printed during logging ...................................................................... stream: Allow setting name printed during logging Change-Id: I539a0d29d11348efe702f971965a55cf56db5c59 --- M TODO-RELEASE M include/osmocom/netif/stream.h M src/stream.c M tests/stream/stream_test.c M tests/stream/stream_test.err 5 files changed, 89 insertions(+), 30 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/36/33336/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index d0852fc..827b3b2 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,4 @@ # 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 +stream NEW API osmo_stream_srv_link_set_name(), osmo_stream_srv_set_name(), osmo_stream_cli_set_name() \ No newline at end of file diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h index b506142..11e9070 100644 --- a/include/osmocom/netif/stream.h +++ b/include/osmocom/netif/stream.h @@ -24,6 +24,7 @@ struct osmo_stream_srv_link *osmo_stream_srv_link_create(void *ctx); void osmo_stream_srv_link_destroy(struct osmo_stream_srv_link *link); +void osmo_stream_srv_link_set_name(struct osmo_stream_srv_link *link, const char *name); void osmo_stream_srv_link_set_nodelay(struct osmo_stream_srv_link *link, bool nodelay); void osmo_stream_srv_link_set_addr(struct osmo_stream_srv_link *link, const char *addr); int osmo_stream_srv_link_set_addrs(struct osmo_stream_srv_link *link, const char **addr, size_t addrcnt); @@ -46,6 +47,7 @@ struct osmo_stream_srv *osmo_stream_srv_create(void *ctx, struct osmo_stream_srv_link *link, int fd, int (*read_cb)(struct osmo_stream_srv *conn), int (*closed_cb)(struct osmo_stream_srv *conn), void *data); struct osmo_stream_srv *osmo_stream_srv_create2(void *ctx, const char *name, struct osmo_stream_srv_link *link, int fd, void *data); +void osmo_stream_srv_set_name(struct osmo_stream_srv *conn, const char *name); void osmo_stream_srv_set_read_cb(struct osmo_stream_srv *conn, int (*read_cb)(struct osmo_stream_srv *conn, struct msgb *msg)); void osmo_stream_srv_set_closed_cb(struct osmo_stream_srv *conn, int (*closed_cb)(struct osmo_stream_srv *conn)); void *osmo_stream_srv_get_data(struct osmo_stream_srv *conn); @@ -64,6 +66,7 @@ /*! \brief Osmocom Stream Client: Single client connection */ struct osmo_stream_cli; +void osmo_stream_cli_set_name(struct osmo_stream_cli *cli, const char *name); void osmo_stream_cli_set_nodelay(struct osmo_stream_cli *cli, bool nodelay); void osmo_stream_cli_set_addr(struct osmo_stream_cli *cli, const char *addr); int osmo_stream_cli_set_addrs(struct osmo_stream_cli *cli, const char **addr, size_t addrcnt); diff --git a/src/stream.c b/src/stream.c index 2ba4cde..0f97c28 100644 --- a/src/stream.c +++ b/src/stream.c @@ -53,8 +53,6 @@ #include <osmocom/netif/sctp.h> -#define LOGSCLI(cli, level, fmt, args...) \ - LOGP(DLINP, level, "[%s] %s(): " fmt, get_value_string(stream_cli_state_names, (cli)->state), __func__, ## args) /*! \addtogroup stream Osmocom Stream Socket * @{ @@ -78,6 +76,22 @@ #define MSG_NOSIGNAL 0 #endif +#define LOGSCLI(cli, level, fmt, args...) \ + LOGP(DLINP, level, "CLICONN(%s){%s} " fmt, \ + cli->name ? : "", \ + get_value_string(stream_cli_state_names, (cli)->state), \ + ## args) + +#define LOGSLNK(link, level, fmt, args...) \ + LOGP(DLINP, level, "SRV(%s) " fmt, \ + link->name ? : "", \ + ## args) + +#define LOGSSRV(srv, level, fmt, args...) \ + LOGP(DLINP, level, "SRVCONN(%s) " fmt, \ + srv->name ? : "", \ + ## args) + /* is any of the bytes from offset .. u8_size in 'u8' non-zero? return offset or -1 if all zero */ static int byte_nonzero(const uint8_t *u8, unsigned int offset, unsigned int u8_size) { @@ -300,7 +314,7 @@ } cli->state = STREAM_CLI_STATE_WAIT_RECONNECT; - LOGSCLI(cli, LOGL_INFO, "retrying in %d seconds...\n", + LOGSCLI(cli, LOGL_INFO, "retrying reconnect in %d seconds...\n", cli->reconnect_timeout); osmo_timer_schedule(&cli->timer, cli->reconnect_timeout, 0); } @@ -404,7 +418,7 @@ llist_del(&msg->list); if (!osmo_stream_cli_is_connected(cli)) { - LOGSCLI(cli, LOGL_ERROR, "not connected, dropping data!\n"); + LOGSCLI(cli, LOGL_ERROR, "send: not connected, dropping data!\n"); return 0; } @@ -438,7 +452,7 @@ } if (ret >= 0 && ret < msgb_length(msg)) { - LOGP(DLINP, LOGL_ERROR, "short send: %d < exp %u\n", ret, msgb_length(msg)); + LOGSCLI(cli, LOGL_ERROR, "short send: %d < exp %u\n", ret, msgb_length(msg)); /* Update msgb and re-add it at the start of the queue: */ msgb_pull(msg, ret); llist_add(&msg->list, &cli->tx_queue); @@ -629,6 +643,15 @@ return cli; } +/*! \brief Set a name on the cli object (used during logging) + * \param[in] cli stream_cli whose name is to be set + * \param[in] name the name to be set on cli + */ +void osmo_stream_cli_set_name(struct osmo_stream_cli *cli, const char *name) +{ + osmo_talloc_replace_string(cli, &cli->name, name); +} + /*! \brief Set the remote address to which we connect * \param[in] cli Stream Client to modify * \param[in] addr Remote IP address @@ -1116,6 +1139,7 @@ struct osmo_stream_srv_link { struct osmo_fd ofd; + char *name; char *addr[OSMO_STREAM_MAX_ADDRS]; uint8_t addrcnt; uint16_t port; @@ -1148,14 +1172,14 @@ is_ipv6 = false; switch (((struct sockaddr *)&sa)->sa_family) { case AF_UNIX: - LOGP(DLINP, LOGL_DEBUG, "accept()ed new link on fd %d\n", + LOGSLNK(link, LOGL_DEBUG, "accept()ed new link on fd %d\n", sock_fd); break; case AF_INET6: is_ipv6 = true; /* fall through */ case AF_INET: - LOGP(DLINP, LOGL_DEBUG, "accept()ed new link from %s to port %u\n", + LOGSLNK(link, LOGL_DEBUG, "accept()ed new link from %s to port %u\n", inet_ntop(is_ipv6 ? AF_INET6 : AF_INET, is_ipv6 ? (void *)&(((struct sockaddr_in6 *)&sa)->sin6_addr) : (void *)&(((struct sockaddr_in *)&sa)->sin_addr), @@ -1169,7 +1193,7 @@ } break; default: - LOGP(DLINP, LOGL_DEBUG, "accept()ed unexpected address family %d\n", + LOGSLNK(link, LOGL_DEBUG, "accept()ed unexpected address family %d\n", ((struct sockaddr *)&sa)->sa_family); goto error_close_socket; } @@ -1217,6 +1241,15 @@ return link; } +/*! \brief Set a name on the srv_link object (used during logging) + * \param[in] link server link whose name is to be set + * \param[in] name the name to be set on link + */ +void osmo_stream_srv_link_set_name(struct osmo_stream_srv_link *link, const char *name) +{ + osmo_talloc_replace_string(link, &link->name, name); +} + /*! \brief Set the NODELAY socket option to avoid Nagle-like behavior * Setting this to nodelay=true will automatically set the NODELAY * socket option on any socket established via this server link, before @@ -1478,6 +1511,7 @@ struct osmo_stream_srv { struct osmo_stream_srv_link *srv; + char *name; enum osmo_stream_mode mode; union { struct osmo_fd ofd; @@ -1494,10 +1528,10 @@ static void stream_srv_iofd_read_cb(struct osmo_io_fd *iofd, int res, struct msgb *msg) { struct osmo_stream_srv *conn = osmo_iofd_get_data(iofd); - LOGP(DLINP, LOGL_DEBUG, "message received (res=%d)\n", res); + LOGSSRV(conn, LOGL_DEBUG, "message received (res=%d)\n", res); if (conn->flags & OSMO_STREAM_SRV_F_FLUSH_DESTROY) { - LOGP(DLINP, LOGL_INFO, "Connection is being flushed and closed; ignoring received message\n"); + LOGSSRV(conn, LOGL_INFO, "Connection is being flushed and closed; ignoring received message\n"); msgb_free(msg); return; } @@ -1514,10 +1548,10 @@ static void stream_srv_iofd_write_cb(struct osmo_io_fd *iofd, int res, struct msgb *msg) { struct osmo_stream_srv *conn = osmo_iofd_get_data(iofd); - LOGP(DLINP, LOGL_DEBUG, "connected write\n"); + LOGSSRV(conn, LOGL_DEBUG, "connected write\n"); if (res == -1) - LOGP(DLINP, LOGL_ERROR, "error to send: %s\n", strerror(errno)); + LOGSSRV(conn, LOGL_ERROR, "error to send: %s\n", strerror(errno)); if (osmo_iofd_txqueue_len(iofd) == 0) if (conn->flags & OSMO_STREAM_SRV_F_FLUSH_DESTROY) @@ -1532,10 +1566,10 @@ { int rc = 0; - LOGP(DLINP, LOGL_DEBUG, "message received\n"); + LOGSSRV(conn, LOGL_DEBUG, "message received\n"); if (conn->flags & OSMO_STREAM_SRV_F_FLUSH_DESTROY) { - LOGP(DLINP, LOGL_INFO, "Connection is being flushed and closed; ignoring received message\n"); + LOGSSRV(conn, LOGL_INFO, "Connection is being flushed and closed; ignoring received message\n"); return 0; } @@ -1560,7 +1594,7 @@ msg = llist_first_entry(&conn->tx_queue, struct msgb, list); llist_del(&msg->list); - LOGP(DLINP, LOGL_DEBUG, "sending %u bytes of data\n", msg->len); + LOGSSRV(conn, LOGL_DEBUG, "sending %u bytes of data\n", msg->len); switch (conn->srv->sk_domain) { case AF_UNIX: @@ -1591,7 +1625,7 @@ } if (ret >= 0 && ret < msgb_length(msg)) { - LOGP(DLINP, LOGL_ERROR, "short send: %d < exp %u\n", ret, msgb_length(msg)); + LOGSSRV(conn, LOGL_ERROR, "short send: %d < exp %u\n", ret, msgb_length(msg)); /* Update msgb and re-add it at the start of the queue: */ msgb_pull(msg, ret); llist_add(&msg->list, &conn->tx_queue); @@ -1599,7 +1633,7 @@ } if (ret == -1) /* send(): On error -1 is returned, and errno is set appropriately */ - LOGP(DLINP, LOGL_ERROR, "error to send: %s\n", strerror(errno)); + LOGSSRV(conn, LOGL_ERROR, "error to send: %s\n", strerror(errno)); msgb_free(msg); @@ -1615,7 +1649,7 @@ struct osmo_stream_srv *conn = ofd->data; int rc = 0; - LOGP(DLINP, LOGL_DEBUG, "connected read/write (what=0x%x)\n", what); + LOGSSRV(conn, LOGL_DEBUG, "connected read/write (what=0x%x)\n", what); if (what & OSMO_FD_READ) rc = osmo_stream_srv_read(conn); if (rc != -EBADF && (what & OSMO_FD_WRITE)) @@ -1655,7 +1689,7 @@ INIT_LLIST_HEAD(&conn->tx_queue); if (osmo_fd_register(&conn->ofd) < 0) { - LOGP(DLINP, LOGL_ERROR, "could not register FD\n"); + LOGSSRV(conn, LOGL_ERROR, "could not register FD\n"); talloc_free(conn); return NULL; } @@ -1683,6 +1717,7 @@ conn->mode = OSMO_STREAM_MODE_OSMO_IO; conn->srv = link; + conn->name = talloc_strdup(conn, name); conn->iofd = osmo_iofd_setup(conn, fd, name, OSMO_IO_FD_MODE_READ_WRITE, &srv_ioops, conn); if (!conn->iofd) { talloc_free(conn); @@ -1691,7 +1726,7 @@ conn->data = data; if (osmo_iofd_register(conn->iofd, fd) < 0) { - LOGP(DLINP, LOGL_ERROR, "could not register FD %d\n", fd); + LOGSSRV(conn, LOGL_ERROR, "could not register FD %d\n", fd); talloc_free(conn); return NULL; } @@ -1699,6 +1734,15 @@ return conn; } +/*! \brief Set a name on the srv object (used during logging) + * \param[in] conn server whose name is to be set + * \param[in] name the name to be set on conn + */ +void osmo_stream_srv_set_name(struct osmo_stream_srv *conn, const char *name) +{ + osmo_talloc_replace_string(conn, &conn->name, name); +} + /*! \brief Set the call-back function when data was read from the stream server socket * Only for osmo_stream_srv created with osmo_stream_srv_create2() * \param[in] conn Stream Server to modify @@ -1797,7 +1841,7 @@ OSMO_ASSERT(conn); OSMO_ASSERT(msg); if (conn->flags & OSMO_STREAM_SRV_F_FLUSH_DESTROY) { - LOGP(DLINP, LOGL_DEBUG, "Connection is being flushed and closed; ignoring new outgoing message\n"); + LOGSSRV(conn, LOGL_DEBUG, "Connection is being flushed and closed; ignoring new outgoing message\n"); msgb_free(msg); return; } @@ -1926,16 +1970,15 @@ if (ret < 0) { if (errno == EPIPE || errno == ECONNRESET) { - LOGP(DLINP, LOGL_ERROR, - "lost connection with client\n"); + LOGSSRV(conn, LOGL_ERROR, "lost connection with client\n"); } return ret; } else if (ret == 0) { - LOGP(DLINP, LOGL_ERROR, "connection closed with client\n"); + LOGSSRV(conn, LOGL_ERROR, "connection closed with client\n"); return ret; } msgb_put(msg, ret); - LOGP(DLINP, LOGL_DEBUG, "received %d bytes from client\n", ret); + LOGSSRV(conn, LOGL_DEBUG, "received %d bytes from client\n", ret); return ret; } diff --git a/tests/stream/stream_test.c b/tests/stream/stream_test.c index 36a222e..1b82d1a 100644 --- a/tests/stream/stream_test.c +++ b/tests/stream/stream_test.c @@ -214,6 +214,7 @@ printf("Prepare %s stream client...\n", ASTR(autoreconnect)); + osmo_stream_cli_set_name(cli, "cli_test"); osmo_stream_cli_set_addr(cli, host); osmo_stream_cli_set_port(cli, port); osmo_stream_cli_set_connect_cb(cli, connect_cb_cli); @@ -323,6 +324,7 @@ LOGLNK(lnk, "error while creating connection\n"); return -EINVAL; } + osmo_stream_srv_set_name(srv, "srv_test"); return 0; } @@ -390,6 +392,7 @@ return EXIT_FAILURE; } + osmo_stream_srv_link_set_name(srv, "srv_link_test"); osmo_stream_srv_link_set_addr(srv, host); osmo_stream_srv_link_set_port(srv, port); osmo_stream_srv_link_set_accept_cb(srv, accept_cb_srv); diff --git a/tests/stream/stream_test.err b/tests/stream/stream_test.err index ca98c82..9fba03e 100644 --- a/tests/stream/stream_test.err +++ b/tests/stream/stream_test.err @@ -12,15 +12,15 @@ {2.000006} autoreconnecting test step 6 [client OK, server OK], FD reg 1 {2.000007} autoreconnecting test step 5 [client OK, server OK], FD reg 1 -[CONNECTED] osmo_stream_cli_recv(): connection closed with srv -[WAIT_RECONNECT] osmo_stream_cli_reconnect(): retrying in 9 seconds... +CLICONN(cli_test){CONNECTED} connection closed with srv +CLICONN(cli_test){WAIT_RECONNECT} retrying reconnect in 9 seconds... {11.000008} autoreconnecting test step 4 [client OK, server OK], FD reg 0 {11.000009} autoreconnecting test step 3 [client OK, server OK], FD reg 1 {11.000010} autoreconnecting test step 2 [client OK, server OK], FD reg 0 -connection closed with client +SRVCONN(srv_test) connection closed with client {11.000011} autoreconnecting test step 1 [client OK, server NA], FD reg 0 @@ -37,7 +37,7 @@ {11.000017} non-reconnecting test step 2 [client OK, server OK], FD reg 1 {11.000018} non-reconnecting test step 1 [client OK, server OK], FD reg 1 -[CONNECTED] osmo_stream_cli_recv(): connection closed with srv -[CLOSED] osmo_stream_cli_reconnect(): not reconnecting, disabled +CLICONN(cli_test){CONNECTED} connection closed with srv +CLICONN(cli_test){CLOSED} not reconnecting, disabled {20.000019} non-reconnecting test step 0 [client OK, server OK], FD reg 0 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33336 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: I539a0d29d11348efe702f971965a55cf56db5c59 Gerrit-Change-Number: 33336 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmo-sccp[master]: Set stream_cli/srv name to contain ASP + sockname
by pespin 16 Jun '23

16 Jun '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/33335 ) Change subject: Set stream_cli/srv name to contain ASP + sockname ...................................................................... Set stream_cli/srv name to contain ASP + sockname Upon connect/accept, update the name to contain both the ASP and the sockname of the established socked. This allows easily identifying the stream based on IP layer as well as upper xUA layer. Example logs: """ stream.c:1193 SRV(::1:2905) accept()ed new link from ::1 to port 2905 stream.c:1672 SRVCONN(asp-dyn-0,(r=::1:43568<->l=::1:2905)) connected read/write (what=0x1) stream.c:1589 SRVCONN(asp-dyn-0,(r=::1:43568<->l=::1:2905)) message received """ """ stream.c:521 CLICONN(asp0){CONNECTING} connection established stream.c:552 CLICONN(asp0,(r=::1:2905<->l=::ffff:127.0.0.2:35911)){CONNECTED} connected read stream.c:401 CLICONN(asp0,(r=::1:2905<->l=::ffff:127.0.0.2:35911)){CONNECTED} message received """ Change-Id: I05bc5f6c7795f62c1814c1c774287b41ee85a475 --- M src/osmo_ss7.c 1 file changed, 35 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/35/33335/1 diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index f5db687..128545d 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1838,6 +1838,10 @@ talloc_free(asp->sock_name); asp->sock_name = osmo_sock_get_name(asp, ofd->fd); + char *cli_name = talloc_asprintf(asp, "%s,%s", asp->cfg.name, asp->sock_name); + osmo_stream_cli_set_name(asp->client, cli_name); + talloc_free(cli_name); + LOGPASP(asp, DLSS7, LOGL_INFO, "Client connected %s\n", asp->sock_name); if (asp->lm && asp->lm->prim_cb) { @@ -2089,9 +2093,15 @@ * connection came in */ asp->server = srv; asp->xua_server = oxs; + /* update the ASP socket name */ talloc_free(asp->sock_name); asp->sock_name = talloc_reparent(link, asp, sock_name); + + char *srv_name = talloc_asprintf(asp, "%s,%s", asp->cfg.name, asp->sock_name); + osmo_stream_srv_set_name(asp->server, srv_name); + talloc_free(srv_name); + /* make sure the conn_cb() is called with the asp as private * data */ osmo_stream_srv_set_data(srv, asp); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/33335 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I05bc5f6c7795f62c1814c1c774287b41ee85a475 Gerrit-Change-Number: 33335 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmo-sccp[master]: Set ASP name on related stream_cli
by pespin 16 Jun '23

16 Jun '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/33334 ) Change subject: Set ASP name on related stream_cli ...................................................................... Set ASP name on related stream_cli Since recently, libosmo-netif makes use of that name when printing. Hence, let's use the already available osmo_stream_cli_set_name2() to set a specific name (osmo_stream_cli_set_name() sets name=""). Change-Id: I1618da8c5b146729eeb32da3f882534b98144514 --- M src/osmo_ss7.c 1 file changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/34/33334/1 diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 3dc0d51..f5db687 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1617,7 +1617,7 @@ asp->server = NULL; } if (!asp->client) - asp->client = osmo_stream_cli_create(asp); + asp->client = osmo_stream_cli_create2(asp, asp->cfg.name); if (!asp->client) { LOGPASP(asp, DLSS7, LOGL_ERROR, "Unable to create stream" " client for ASP %s\n", asp->cfg.name); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/33334 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I1618da8c5b146729eeb32da3f882534b98144514 Gerrit-Change-Number: 33334 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmocom-bb[master]: layer23: fix handling of logging category mask (-d option)
by Hoernchen 16 Jun '23

16 Jun '23
Attention is currently required from: fixeria. Hoernchen has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/33329 ) Change subject: layer23: fix handling of logging category mask (-d option) ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/33329 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I1b2b7804bf99b71f96e9197f7824cfd20431e8a1 Gerrit-Change-Number: 33329 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 16 Jun 2023 11:41:27 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: mgw: Introduce test TC_auep_null
by pespin 16 Jun '23

16 Jun '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33322 ) Change subject: mgw: Introduce test TC_auep_null ...................................................................... Patch Set 2: Verified+1 (1 comment) Patchset: PS2: Hmm strange jenkins provided Verified+1 but it seems it did not end up storing this change... adding +1 myself now. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33322 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I9395cd526cf626974fb0e2ed93ff5d95a433d8c0 Gerrit-Change-Number: 33322 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 16 Jun 2023 10:13:42 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: socket: Ensure fd is not negative in osmo_sock_get_name_buf()
by pespin 16 Jun '23

16 Jun '23
Attention is currently required from: laforge, daniel. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/33333 ) Change subject: socket: Ensure fd is not negative in osmo_sock_get_name_buf() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33333 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I76727993224ef87b475c33360c24966e82e866ec Gerrit-Change-Number: 33333 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Fri, 16 Jun 2023 10:11:00 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-netif[master]: stream: Assert that fd is valid in stream_cli_handle_connecting()
by pespin 16 Jun '23

16 Jun '23
Attention is currently required from: laforge, daniel. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33332 ) Change subject: stream: Assert that fd is valid in stream_cli_handle_connecting() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33332 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: If0bed2bae556e0a8233e9e66e82c70a5c677fc3c Gerrit-Change-Number: 33332 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Fri, 16 Jun 2023 10:10:37 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-hnbgw[master]: RUA: log tweak
by pespin 16 Jun '23

16 Jun '23
Attention is currently required from: neels. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/33331 ) Change subject: RUA: log tweak ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/33331 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: I87592cbf197d5d3d2a22b04d9f6b64422af65ded Gerrit-Change-Number: 33331 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Fri, 16 Jun 2023 10:09:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-hnbgw[master]: tweak lots of logging
by pespin 16 Jun '23

16 Jun '23
Attention is currently required from: neels, laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/33171 ) Change subject: tweak lots of logging ...................................................................... Patch Set 7: (2 comments) File src/osmo-hnbgw/hnbgw_cn.c: https://gerrit.osmocom.org/c/osmo-hnbgw/+/33171/comment/3543a991_7b1dee0e PS3, Line 515: LOG_CNLINK(cnlink, DCN, LOGL_NOTICE, "using: cs7-%u %s <-> %s %s %s\n", > I am not using multi line logging here ... ? […] #define CNLINK_PRINT_FMT "cs7-%u %s <-> %s %s %s" #define CNLINK_PRINT_ARGS(cnlink) ss7->cfg.id, \ osmo_ss7_pointcode_print(ss7, cnlink->hnbgw_sccp_user->local_addr.pc), \ osmo_ss7_pointcode_print2(ss7, cnlink->remote_addr.pc), \ cnlink->name, cnlink->use.remote_addr_name ? : "(default remote point-code)" File src/osmo-hnbgw/hnbgw_cn.c: https://gerrit.osmocom.org/c/osmo-hnbgw/+/33171/comment/3b6a289c_b8e52303 PS7, Line 635: hnbgw_cnlink_log_self(cnlink); LOGP(DCN, LOGL_NOTICE, "Using " CNLINK_PRINT_FMT "\n", CNLINK_PRINT_ARGS(cnlink)); (or simply copy the entire log line if you are really expecting to use it twice). Also, I'm note sure why cannot LOG_CNLINK or alike be used there instead. Maybe LOG_CNLINK should be extended with more info? -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/33171 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: I41275d8c3e272177976a9302795884666c35cd06 Gerrit-Change-Number: 33171 Gerrit-PatchSet: 7 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Fri, 16 Jun 2023 10:08:27 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • ...
  • 248
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.