neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/33331 )
Change subject: RUA: log tweak
......................................................................
RUA: log tweak
I noticed that the log is awfully silent about disconnecting RUA, even
with DEBUG turned on. It is an important item that should show in the
logs.
Change-Id: I87592cbf197d5d3d2a22b04d9f6b64422af65ded
---
M src/osmo-hnbgw/context_map_rua.c
1 file changed, 14 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/31/33331/1
diff --git a/src/osmo-hnbgw/context_map_rua.c b/src/osmo-hnbgw/context_map_rua.c
index 09c275d..6064b1c 100644
--- a/src/osmo-hnbgw/context_map_rua.c
+++ b/src/osmo-hnbgw/context_map_rua.c
@@ -262,6 +262,7 @@
.present = RUA_Cause_PR_radioNetwork,
.choice.radioNetwork = RUA_CauseRadioNetwork_network_release,
};
+ LOGPFSML(fi, LOGL_INFO, "Tx RUA Disconnect\n");
if (rua_tx_disc(map->hnb_ctx, map->is_ps, map->rua_ctx_id, &rua_cause, NULL, 0))
LOGPFSML(fi, LOGL_ERROR, "Failed to send Disconnect to RUA\n");
}
--
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: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: neels.
Hello Jenkins Builder, laforge, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/33175
to look at the new patch set (#6).
Change subject: detect in/active CN links by RANAP RESET
......................................................................
detect in/active CN links by RANAP RESET
Implement cnlink FSM. This is a copy of osmo-bsc/bssmap_reset.c, except
for the connection success/failure counting.
The reason to exclude the CONN_CFM_FAILURE/_SUCCESS: it is a rather
experimental feature and should probably rather be covered by PCSTATE
notifications and protocol layer timeout tuning (e.g. SCCP ia timers).
Related: SYS#6412
Change-Id: Id3eefdea889a736fd5957b80280fa45b9547b792
---
M include/osmocom/hnbgw/hnbgw.h
M include/osmocom/hnbgw/hnbgw_cn.h
M src/osmo-hnbgw/Makefile.am
A src/osmo-hnbgw/cnlink.c
M src/osmo-hnbgw/context_map.c
M src/osmo-hnbgw/hnbgw_cn.c
M src/osmo-hnbgw/hnbgw_vty.c
M src/osmo-hnbgw/tdefs.c
M tests/cnpool.vty
9 files changed, 424 insertions(+), 91 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/75/33175/6
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/33175
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Id3eefdea889a736fd5957b80280fa45b9547b792
Gerrit-Change-Number: 33175
Gerrit-PatchSet: 6
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newpatchset
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/33329 )
Change subject: layer23: fix handling of logging category mask (-d option)
......................................................................
layer23: fix handling of logging category mask (-d option)
In change 67943df4 I broke handling of the logging category mask in
the mobile app. Adding this option results in a segfault:
ERROR: osmo_log_info == NULL! You must call log_init() before
using logging in log_parse_category_mask()!
Assert failed osmo_log_info src/libosmocore/src/core/logging.c:329
As can be seen, the problem is that we are calling
log_parse_category_mask() before initializing the logging.
As possible solution, I could rearrange the code to parse command
line options after calling osmo_init_logging2(). This would fix
the segfault, but would not fully solve the problem.
If we call log_parse_category_mask() before parsing the config file,
then logging configuration in the config file overwrites the logging
configuration specified via the command line. But we want the
opposite: the command line setting should overwrite the config file
parameters. This is handy because there is no need to edit the
config file if you quickly need to test something.
So let's call log_parse_category_mask() after parsing the config file.
Change-Id: I1b2b7804bf99b71f96e9197f7824cfd20431e8a1
Fixes: 67943df4 "layer23: fix parsing of command line options"
---
M src/host/layer23/src/common/main.c
M src/host/layer23/src/mobile/main.c
2 files changed, 43 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/29/33329/1
diff --git a/src/host/layer23/src/common/main.c b/src/host/layer23/src/common/main.c
index a4b9441..919a231 100644
--- a/src/host/layer23/src/common/main.c
+++ b/src/host/layer23/src/common/main.c
@@ -58,6 +58,7 @@
struct llist_head ms_list;
static char *gsmtap_ip = NULL;
static char *config_file = NULL;
+static char *log_cat_mask = NULL;
int (*l23_app_start)(void) = NULL;
int (*l23_app_work)(void) = NULL;
@@ -162,7 +163,7 @@
config_file = optarg;
break;
case 'd':
- log_parse_category_mask(osmo_stderr_target, optarg);
+ log_cat_mask = optarg;
break;
default:
if (l23_app_info.cfg_handle_opt != NULL)
@@ -268,6 +269,9 @@
exit(1);
}
+ if (log_cat_mask != NULL)
+ log_parse_category_mask(osmo_stderr_target, log_cat_mask);
+
if (l23_app_info.opt_supported & L23_OPT_TAP) {
if (gsmtap_ip) {
if (l23_cfg.gsmtap.remote_host != NULL) {
diff --git a/src/host/layer23/src/mobile/main.c b/src/host/layer23/src/mobile/main.c
index 71a16c1..8720ea7 100644
--- a/src/host/layer23/src/mobile/main.c
+++ b/src/host/layer23/src/mobile/main.c
@@ -54,6 +54,7 @@
struct l23_global_config l23_cfg;
struct llist_head ms_list;
static const char *custom_cfg_file = NULL;
+static const char *log_cat_mask = NULL;
static char *config_file = NULL;
char *config_dir = NULL;
int daemonize = 0;
@@ -118,7 +119,7 @@
custom_cfg_file = optarg;
break;
case 'd':
- log_parse_category_mask(osmo_stderr_target, optarg);
+ log_cat_mask = optarg;
break;
case 'D':
daemonize = 1;
@@ -297,6 +298,9 @@
exit(1);
}
+ if (log_cat_mask != NULL)
+ log_parse_category_mask(osmo_stderr_target, log_cat_mask);
+
if (l23_cfg.gsmtap.remote_host) {
l23_cfg.gsmtap.inst = gsmtap_source_init2(l23_cfg.gsmtap.local_host, 0,
l23_cfg.gsmtap.remote_host, GSMTAP_UDP_PORT, 1);
--
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-MessageType: newchange
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33327 )
Change subject: stream: Document osmo_stream_cli_create2()
......................................................................
stream: Document osmo_stream_cli_create2()
Change-Id: I0c2f46e02d94c3459e4043a9db7fccd906521dd2
---
M src/stream.c
1 file changed, 16 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/stream.c b/src/stream.c
index b6ef92f..d46bc78 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -616,7 +616,13 @@
.segmentation_cb = NULL,
};
-
+/*! \brief Create an Osmocom stream client
+ * \param[in] ctx talloc context from which to allocate memory
+ * This function allocates a new \ref osmo_stream_cli and initializes
+ * it with default values (5s reconnect timer, TCP protocol)
+ * \param[in] name a description of the stream client. Will be used in logging
+ * \return allocated stream client, or NULL in case of error
+ */
struct osmo_stream_cli *osmo_stream_cli_create2(void *ctx, const char *name)
{
struct osmo_stream_cli *cli;
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33327
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I0c2f46e02d94c3459e4043a9db7fccd906521dd2
Gerrit-Change-Number: 33327
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
Attention is currently required from: daniel.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33328 )
Change subject: stream: Remove duplicated code in osmo_stream_cli_create()
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33328
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I0652361a6bdf194545f36edc5e12e5d26798163a
Gerrit-Change-Number: 33328
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 15 Jun 2023 20:16:36 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: daniel.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33327 )
Change subject: stream: Document osmo_stream_cli_create2()
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33327
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I0c2f46e02d94c3459e4043a9db7fccd906521dd2
Gerrit-Change-Number: 33327
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 15 Jun 2023 20:16:19 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33326 )
Change subject: stream: Setup ofd in osmo_stream_cli_open
......................................................................
stream: Setup ofd in osmo_stream_cli_open
Don't reset the osmo_fd data in osmo_stream_cli_set_read_cb().
osmo_ss7_asp_restart() in libosmo-sccp calls
osmo_stream_cli_set_read_cb() which causes the fd to be set to -1.
osmo_stream_cli_open() which is called after that then doesn't close the
old fd and opening the new one fails.
osmo_fd priv_nr, callback and data are never modified in osmo_stream_cli
so simply use these values in osmo_stream_cli_open()
Change-Id: Id9b4db06d5ea1f29cbd1817cab3c71765ab30a53
---
M src/stream.c
1 file changed, 20 insertions(+), 6 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/stream.c b/src/stream.c
index d52b7a0..b6ef92f 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -859,10 +859,6 @@
{
OSMO_ASSERT(cli->mode != OSMO_STREAM_MODE_OSMO_IO);
cli->mode = OSMO_STREAM_MODE_OSMO_FD;
- cli->ofd.fd = -1;
- cli->ofd.priv_nr = 0;
- cli->ofd.cb = osmo_stream_cli_fd_cb;
- cli->ofd.data = cli;
cli->read_cb = read_cb;
}
@@ -926,7 +922,7 @@
osmo_stream_cli_reconnect(cli);
return ret;
}
- osmo_fd_setup(&cli->ofd, ret, OSMO_FD_READ | OSMO_FD_WRITE, cli->ofd.cb, cli->ofd.data, cli->ofd.priv_nr);
+ osmo_fd_setup(&cli->ofd, ret, OSMO_FD_READ | OSMO_FD_WRITE, osmo_stream_cli_fd_cb, cli, 0);
if (cli->flags & OSMO_STREAM_CLI_F_NODELAY) {
ret = setsockopt_nodelay(cli->ofd.fd, cli->proto, 1);
@@ -1019,7 +1015,7 @@
switch (cli->mode) {
case OSMO_STREAM_MODE_OSMO_FD:
- osmo_fd_setup(&cli->ofd, fd, OSMO_FD_READ | OSMO_FD_WRITE, cli->ofd.cb, cli->ofd.data, cli->ofd.priv_nr);
+ osmo_fd_setup(&cli->ofd, fd, OSMO_FD_READ | OSMO_FD_WRITE, osmo_stream_cli_fd_cb, cli, 0);
if (osmo_fd_register(&cli->ofd) < 0)
goto error_close_socket;
break;
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33326
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Id9b4db06d5ea1f29cbd1817cab3c71765ab30a53
Gerrit-Change-Number: 33326
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
Attention is currently required from: daniel.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33326 )
Change subject: stream: Setup ofd in osmo_stream_cli_open
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33326
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Id9b4db06d5ea1f29cbd1817cab3c71765ab30a53
Gerrit-Change-Number: 33326
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 15 Jun 2023 20:16:04 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/33326 )
Change subject: stream: Setup ofd in osmo_stream_cli_open
......................................................................
stream: Setup ofd in osmo_stream_cli_open
Don't reset the osmo_fd data in osmo_stream_cli_set_read_cb().
osmo_ss7_asp_restart() in libosmo-sccp calls
osmo_stream_cli_set_read_cb() which causes the fd to be set to -1.
osmo_stream_cli_open() which is called after that then doesn't close the
old fd and opening the new one fails.
osmo_fd priv_nr, callback and data are never modified in osmo_stream_cli
so simply use these values in osmo_stream_cli_open()
Change-Id: Id9b4db06d5ea1f29cbd1817cab3c71765ab30a53
---
M src/stream.c
1 file changed, 20 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/26/33326/1
diff --git a/src/stream.c b/src/stream.c
index d52b7a0..b6ef92f 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -859,10 +859,6 @@
{
OSMO_ASSERT(cli->mode != OSMO_STREAM_MODE_OSMO_IO);
cli->mode = OSMO_STREAM_MODE_OSMO_FD;
- cli->ofd.fd = -1;
- cli->ofd.priv_nr = 0;
- cli->ofd.cb = osmo_stream_cli_fd_cb;
- cli->ofd.data = cli;
cli->read_cb = read_cb;
}
@@ -926,7 +922,7 @@
osmo_stream_cli_reconnect(cli);
return ret;
}
- osmo_fd_setup(&cli->ofd, ret, OSMO_FD_READ | OSMO_FD_WRITE, cli->ofd.cb, cli->ofd.data, cli->ofd.priv_nr);
+ osmo_fd_setup(&cli->ofd, ret, OSMO_FD_READ | OSMO_FD_WRITE, osmo_stream_cli_fd_cb, cli, 0);
if (cli->flags & OSMO_STREAM_CLI_F_NODELAY) {
ret = setsockopt_nodelay(cli->ofd.fd, cli->proto, 1);
@@ -1019,7 +1015,7 @@
switch (cli->mode) {
case OSMO_STREAM_MODE_OSMO_FD:
- osmo_fd_setup(&cli->ofd, fd, OSMO_FD_READ | OSMO_FD_WRITE, cli->ofd.cb, cli->ofd.data, cli->ofd.priv_nr);
+ osmo_fd_setup(&cli->ofd, fd, OSMO_FD_READ | OSMO_FD_WRITE, osmo_stream_cli_fd_cb, cli, 0);
if (osmo_fd_register(&cli->ofd) < 0)
goto error_close_socket;
break;
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/33326
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Id9b4db06d5ea1f29cbd1817cab3c71765ab30a53
Gerrit-Change-Number: 33326
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: newchange