Attention is currently required from: laforge, pespin.
Hello Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/41703?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Code-Review+1 by laforge, Verified+1 by Jenkins Builder
Change subject: logging_vty: Set 'gsmtap log nonblocking-io' as default
......................................................................
logging_vty: Set 'gsmtap log nonblocking-io' as default
Apps using a VTY are expected to be using an event loop, and hence
should not be using blocking operations which would stall the event
loop.
If user fears losing messages (eg, when enabling a lot of DEBUG),
then the taget can still be switched to "wq" at the expense of
losing performance, or increasing the kernel UDP socket sndbuf by means
of sysctl net.core.wmem_{default,max}.
Related: OS#6213
Related: OS#6794
Change-Id: Ifca8a821e13ec1327ab2476b0db91078fcff948b
---
M src/vty/logging_vty.c
1 file changed, 7 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/03/41703/3
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41703?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ifca8a821e13ec1327ab2476b0db91078fcff948b
Gerrit-Change-Number: 41703
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Attention is currently required from: fixeria, laforge.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/41702?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: logging_vty: Allow setting gsmtap log tgt as (blocking-io|nonblocking-io|wq)
......................................................................
logging_vty: Allow setting gsmtap log tgt as (blocking-io|nonblocking-io|wq)
The current patch adds the possibility to configure it, and leaves the
previous behavior as default: blocking-io.
Related: OS#6213
Change-Id: Id5d31bedd7d265d18f6e475ccbc94ced80598d04
---
M TODO-RELEASE
M include/osmocom/core/gsmtap_util.h
M include/osmocom/core/socket.h
M src/core/gsmtap_util.c
M src/core/libosmocore.map
M src/core/socket.c
M src/vty/logging_vty.c
7 files changed, 88 insertions(+), 7 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/02/41702/3
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41702?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id5d31bedd7d265d18f6e475ccbc94ced80598d04
Gerrit-Change-Number: 41702
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/41710?usp=email )
Change subject: gsmtap_util: Avoid sink_fd leak gsmtap_source_add_sinki() called multiple times
......................................................................
gsmtap_util: Avoid sink_fd leak gsmtap_source_add_sinki() called multiple times
gti->sink_fd could leak if gsmtap_source_add_sink() was called multiple
times.
Also if gsmtap_source_add_sink_fd() failed, rc != -1 was returned and
hence a close() on a wrong fd would be attempted.
This commit fixes both issues, making the whole sink_fd field much more
robust.
Change-Id: I7af5a6c7d64954ee2cc013711702b846dfaa02b1
(cherry picked from commit 85112c4911252412f0d127f01bde92794e232d00)
---
M src/core/gsmtap_util.c
1 file changed, 11 insertions(+), 3 deletions(-)
Approvals:
osmith: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/core/gsmtap_util.c b/src/core/gsmtap_util.c
index 35bbf77..9b9c3b6 100644
--- a/src/core/gsmtap_util.c
+++ b/src/core/gsmtap_util.c
@@ -435,7 +435,7 @@
/*! Add a local sink to an existing GSMTAP source and return fd
* \param[in] gti existing GSMTAP source
- * \returns file descriptor of locally bound receive socket
+ * \returns file descriptor of locally bound receive socket; negative on error
*
* In case the GSMTAP socket is connected to a local destination
* IP/port, this function creates a corresponding receiving socket
@@ -450,7 +450,15 @@
*/
int gsmtap_source_add_sink(struct gsmtap_inst *gti)
{
- return gti->sink_fd = gsmtap_source_add_sink_fd(gsmtap_inst_fd2(gti));
+ int rc;
+
+ if (gti->sink_fd >= 0)
+ return -EALREADY;
+
+ rc = gsmtap_source_add_sink_fd(gsmtap_inst_fd2(gti));
+ if (rc >= 0)
+ gti->sink_fd = rc;
+ return rc;
}
/* Registered in Osmo IO as a no-op to set the write callback. */
@@ -535,7 +543,7 @@
close(gti->wq.bfd.fd);
- if (gti->sink_fd != -1) {
+ if (gti->sink_fd >= 0) {
close(gti->sink_fd);
gti->sink_fd = -1;
}
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41710?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmocore
Gerrit-Branch: pespin/rel-1.12.0
Gerrit-Change-Id: I7af5a6c7d64954ee2cc013711702b846dfaa02b1
Gerrit-Change-Number: 41710
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/41709?usp=email )
Change subject: vty: assert in optional param followed by optional-multi-choice param: Fix [2/2]
......................................................................
vty: assert in optional param followed by optional-multi-choice param: Fix [2/2]
in cmd_make_descr, cp during the asserting iteration looks like this:
(gdb) print cp
$18 = 0x555555c1939d ") [(one|two|three)"
As a result, first multiple is set to 0 and later on logic was missing
for this specific case.
Change-Id: I4c184db53bec28ab42bcd45e033733d850eea5d2
Fixes: b55f4d2df21b966c3953264d8961f259814f4650
Related: OS#6360
(cherry picked from commit 2e41c4301ece14cbd9d22896a079619ba080200a)
---
M src/vty/command.c
1 file changed, 6 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, approved
diff --git a/src/vty/command.c b/src/vty/command.c
index 8594290..c1bda8a 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -443,6 +443,12 @@
while (isspace((int)*cp) && *cp != '\0')
cp++;
+ /* Explicitly detect optional multi-choice braces like [(one|two)]. */
+ if (cp[0] == '[' && cp[1] == '(') {
+ optional_brace = 1;
+ cp++;
+ }
+
if (*cp == '(') {
multiple = 1;
cp++;
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41709?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: libosmocore
Gerrit-Branch: pespin/rel-1.12.0
Gerrit-Change-Id: I4c184db53bec28ab42bcd45e033733d850eea5d2
Gerrit-Change-Number: 41709
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: pespin.
pespin has removed a vote from this change. ( https://gerrit.osmocom.org/c/libosmocore/+/41708?usp=email )
Change subject: vty: assert in optional param followed by optional-multi-choice param: Reproduce [1/2]
......................................................................
Removed Verified-1 by Jenkins Builder (1000002)
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41708?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: deleteVote
Gerrit-Project: libosmocore
Gerrit-Branch: pespin/rel-1.12.0
Gerrit-Change-Id: I6ad93a304ce498ba9d57fc7e2fd238e6c16e29e0
Gerrit-Change-Number: 41708
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>