tnt has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/26657 )
Change subject: conv: Fix the traceback for tail biting codes
......................................................................
Patch Set 3:
Heh, I don't like the linter comments and it makes it inconsistent with the surrouding code :/
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/26657
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I87e51d3880c0fe7bf3d6cd08fd46517a424a230c
Gerrit-Change-Number: 26657
Gerrit-PatchSet: 3
Gerrit-Owner: tnt <tnt(a)246tNt.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 05 Jan 2022 10:06:06 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
laforge has uploaded a new patch set (#3) to the change originally created by tnt. ( https://gerrit.osmocom.org/c/libosmocore/+/26657 )
Change subject: conv: Fix the traceback for tail biting codes
......................................................................
conv: Fix the traceback for tail biting codes
When picking the end state, looking only at the path metric
is highly suboptimal because in a tail biting code, we _know_ that
whatever treillis path is correct, it must start and end at the same
state. So we only consider path meeting that condition. We know any
path that doesn't isn't the right one. We only fallback to only
path metric if no path met that condition.
Fixes OS#4508
Signed-off-by: Sylvain Munaut <tnt(a)246tNt.com>
Change-Id: I87e51d3880c0fe7bf3d6cd08fd46517a424a230c
---
M include/osmocom/core/conv.h
M src/conv.c
M src/conv_acc.c
3 files changed, 89 insertions(+), 22 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/57/26657/3
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/26657
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I87e51d3880c0fe7bf3d6cd08fd46517a424a230c
Gerrit-Change-Number: 26657
Gerrit-PatchSet: 3
Gerrit-Owner: tnt <tnt(a)246tNt.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/26726 )
Change subject: logging: Fix Not enough tailroom msgb_put in _output_buf callers
......................................................................
logging: Fix Not enough tailroom msgb_put in _output_buf callers
The function clearly specified in its documentation that the number of
bytes written to the out buffer were being returned. However, the value
returned was "the number of characters (excluding the terminating null
byte) which would have been written to the final string if enough space
had been available.", aka snprintf-style.
The 2 callers of that function were not expecting it, so if a long
enough buffer was passed, the program asserted.
Closes: OS#5383
Change-Id: I8d71bd1a0dad37606acb8302b05c2ae338112e57
---
M src/logging.c
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/src/logging.c b/src/logging.c
index e5c66f2..24b5553 100644
--- a/src/logging.c
+++ b/src/logging.c
@@ -601,7 +601,8 @@
OSMO_SNPRINTF_RET(ret, rem, offset, len);
}
err:
- buf[buf_len-1] = '\0';
+ len = OSMO_MIN(buf_len - 1, len);
+ buf[len] = '\0';
return len;
}
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/26726
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I8d71bd1a0dad37606acb8302b05c2ae338112e57
Gerrit-Change-Number: 26726
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26685 )
Change subject: RTP IuUP Emulation: Avoid spamming with retransmitted Init
......................................................................
RTP IuUP Emulation: Avoid spamming with retransmitted Init
Until now, an Init was sent on each RTP transmit period, clogging the
pcap files. Moreover, this is break by design, since transmitting
another Init so close the the previous one would give no time to the
transmitter to receive the Init ACk and move state, which means the
other end would potentially be reconfigured each time (for each Init).
Change-Id: I8e299a3fe49f9d31cae182f7ed4dc0ea3fc22ba2
---
M library/IuUP_Emulation.ttcn
M library/RTP_Emulation.ttcn
2 files changed, 11 insertions(+), 2 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/library/IuUP_Emulation.ttcn b/library/IuUP_Emulation.ttcn
index b35602c..19c2c84 100644
--- a/library/IuUP_Emulation.ttcn
+++ b/library/IuUP_Emulation.ttcn
@@ -105,6 +105,7 @@
} else if (match(pdu, tr_IuUP_INIT_ACK)) {
if (st.cfg.active_init == true) {
log("IuUP INIT_ACK Received");
+ st.pending_tx_pdu := omit; /* Drop pending Init retrans */
st.state := ST_DATA_TRANSFER_READY;
} else {
setverdict(fail, "INIT_ACK received in PASSIVE role");
@@ -124,8 +125,12 @@
select (st.state) {
case (ST_INIT) {
if (st.cfg.active_init) {
- /* send INIT */
- pdu := valueof(ts_IuUP_INIT('160051673C01270000820000001710000100'O));
+ if (not isvalue(st.pending_tx_pdu)) {
+ /* send INIT */
+ pdu := valueof(ts_IuUP_INIT('160051673C01270000820000001710000100'O));
+ st.pending_tx_pdu := pdu;
+ } /* else: wait for INIT-ACK return ''O at the end */
+
} else {
/* wait for INIT */
if (isvalue(st.pending_tx_pdu)) {
diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn
index b2360dc..bdca75d 100644
--- a/library/RTP_Emulation.ttcn
+++ b/library/RTP_Emulation.ttcn
@@ -345,6 +345,10 @@
private function f_tx_rtp(octetstring payload, BIT1 marker := '0'B) runs on RTP_Emulation_CT {
if (g_cfg.iuup_mode) {
payload := f_IuUP_Em_tx_encap(g_iuup_ent, payload);
+ if (lengthof(payload) == 0) {
+ /* Nothing to transmit, waiting for INIT-ACK */
+ return;
+ }
}
var PDU_RTP rtp := valueof(ts_RTP(g_cfg.tx_ssrc, g_cfg.tx_payload_type, g_tx_next_seq,
g_tx_next_ts, payload, marker));
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26685
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: I8e299a3fe49f9d31cae182f7ed4dc0ea3fc22ba2
Gerrit-Change-Number: 26685
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged