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 2024

  • 1 participants
  • 1566 discussions
[S] Change in osmocom-bb[master]: mobile: fix -Wmaybe-uninitialized in gsm48_rr_tx_meas_rep()
by osmith 14 Jun '24

14 Jun '24
Attention is currently required from: fixeria. osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/37213?usp=email ) Change subject: mobile: fix -Wmaybe-uninitialized in gsm48_rr_tx_meas_rep() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/37213?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I111438633ed48e16f7c43fc1b7a23ae6753a404d Gerrit-Change-Number: 37213 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Fri, 14 Jun 2024 07:17:47 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmocore[master]: codec: make osmo_hr_check_sid() more efficient
by falconia 14 Jun '24

14 Jun '24
Attention is currently required from: falconia. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/37227?usp=email to look at the new patch set (#3). Change subject: codec: make osmo_hr_check_sid() more efficient ...................................................................... codec: make osmo_hr_check_sid() more efficient The operation of checking an HRv1 codec frame for the possibility of a perfect, error-free SID entails checking the last 79 bits out of 112, to see if they are all 1s. This operation can be done much more efficiently without using bitvec. This change also affects the logic of what osmo_hr_check_sid() does when the payload length argument is 0, or otherwise less than the expected 14. The old code had a surely-unintended effect of returning true on a 0-length payload; the new version returns false (the input is not a perfect SID frame) if the payload length is 0 or otherwise shorter than GSM_HR_BYTES. Change-Id: Ib14204102c03c14d6c5aab42b0ffbef2c3dda3fd --- M src/codec/gsm620.c 1 file changed, 42 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/27/37227/3 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/37227?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib14204102c03c14d6c5aab42b0ffbef2c3dda3fd Gerrit-Change-Number: 37227 Gerrit-PatchSet: 3 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in simtrace2[master]: cardemu: add support for inverted sim presence pins
by lynxis lazus 13 Jun '24

13 Jun '24
lynxis lazus has abandoned this change. ( https://gerrit.osmocom.org/c/simtrace2/+/36441?usp=email ) Change subject: cardemu: add support for inverted sim presence pins ...................................................................... Abandoned replace by new patch series -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/36441?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I33325f763b56b297762a3fb6fe6baa7b0354de3c Gerrit-Change-Number: 36441 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: mschramm <mschramm(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: abandon
1 0
0 0
[S] Change in simtrace2[master]: dissector: add support for sim polarity
by lynxis lazus 13 Jun '24

13 Jun '24
Attention is currently required from: laforge. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/simtrace2/+/36980?usp=email to look at the new patch set (#4). The following approvals got outdated and were removed: Code-Review+1 by laforge, Verified+1 by Jenkins Builder Change subject: dissector: add support for sim polarity ...................................................................... dissector: add support for sim polarity Needs testing. Related: SYS#6946 Change-Id: If3ae350d0f4d737bc9e80c4f5d73cc1a39d076af --- M contrib/simtrace.lua 1 file changed, 27 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/80/36980/4 -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/36980?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: If3ae350d0f4d737bc9e80c4f5d73cc1a39d076af Gerrit-Change-Number: 36980 Gerrit-PatchSet: 4 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in docker-playground[master]: s1gw: add osmo-s1gw-master
by fixeria 13 Jun '24

13 Jun '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/37229?usp=email ) Change subject: s1gw: add osmo-s1gw-master ...................................................................... s1gw: add osmo-s1gw-master Change-Id: Ic732f57940fa41fe21a26af663fea559551b1811 Related: SYS#6772 --- A osmo-s1gw-master/Dockerfile A osmo-s1gw-master/Makefile A osmo-s1gw-master/osmo-s1gw.config 3 files changed, 37 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/29/37229/1 diff --git a/osmo-s1gw-master/Dockerfile b/osmo-s1gw-master/Dockerfile new file mode 100644 index 0000000..34028f8 --- /dev/null +++ b/osmo-s1gw-master/Dockerfile @@ -0,0 +1,24 @@ +ARG USER +ARG DISTRO +FROM $USER/$DISTRO-erlang +# Arguments used after FROM must be specified again +ARG DISTRO + +WORKDIR /tmp + +ARG OSMO_S1GW_BRANCH="master" + +RUN git clone https://gerrit.osmocom.org/erlang/osmo-s1gw.git +ADD https://gerrit.osmocom.org/plugins/gitiles/erlang/osmo-s1gw/+/$OSMO_S1GW_BR… /tmp/commit-osmo-s1gw + +RUN cd osmo-s1gw && \ + git fetch && git checkout $OSMO_S1GW_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_S1GW_BRANCH || exit 1); \ + git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ + make build + +VOLUME /data + +COPY osmo-s1gw.config /data/osmo-s1gw.config + +CMD ["/bin/sh", "-c", "ERL_FLAGS='-config /data/osmo-s1gw.config' /tmp/osmo-s1gw/_build/default/bin/osmo-s1gw > /data/osmo-s1gw.log 2>&1"] diff --git a/osmo-s1gw-master/Makefile b/osmo-s1gw-master/Makefile new file mode 100644 index 0000000..8d0e10b --- /dev/null +++ b/osmo-s1gw-master/Makefile @@ -0,0 +1 @@ +include ../make/Makefile diff --git a/osmo-s1gw-master/osmo-s1gw.config b/osmo-s1gw-master/osmo-s1gw.config new file mode 100644 index 0000000..ef48a29 --- /dev/null +++ b/osmo-s1gw-master/osmo-s1gw.config @@ -0,0 +1,2 @@ +[{osmo_s1gw, [ +]}]. -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/37229?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: Ic732f57940fa41fe21a26af663fea559551b1811 Gerrit-Change-Number: 37229 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in docker-playground[master]: s1gw: add ttcn3-s1gw-test
by fixeria 13 Jun '24

13 Jun '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/docker-playground/+/37230?usp=email ) Change subject: s1gw: add ttcn3-s1gw-test ...................................................................... s1gw: add ttcn3-s1gw-test Change-Id: I95000d7a9d778df1da830cd5059e5b6899391fbe Related: SYS#6772 --- A ttcn3-s1gw-test/Dockerfile A ttcn3-s1gw-test/Makefile A ttcn3-s1gw-test/S1GW_Tests.cfg A ttcn3-s1gw-test/jenkins.sh A ttcn3-s1gw-test/osmo-s1gw.config 5 files changed, 117 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/30/37230/1 diff --git a/ttcn3-s1gw-test/Dockerfile b/ttcn3-s1gw-test/Dockerfile new file mode 100644 index 0000000..296cd02 --- /dev/null +++ b/ttcn3-s1gw-test/Dockerfile @@ -0,0 +1,14 @@ +ARG REGISTRY +ARG USER +FROM $REGISTRY/$USER/debian-bookworm-titan + +ARG OSMO_TTCN3_BRANCH="master" + +ADD https://gerrit.osmocom.org/plugins/gitiles/osmo-ttcn3-hacks/+/$OSMO_TTCN3_B… /tmp/commit +RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" s1gw + +VOLUME /data + +COPY S1GW_Tests.cfg /data/S1GW_Tests.cfg + +CMD ttcn3-docker-run s1gw S1GW_Tests diff --git a/ttcn3-s1gw-test/Makefile b/ttcn3-s1gw-test/Makefile new file mode 100644 index 0000000..8d0e10b --- /dev/null +++ b/ttcn3-s1gw-test/Makefile @@ -0,0 +1 @@ +include ../make/Makefile diff --git a/ttcn3-s1gw-test/S1GW_Tests.cfg b/ttcn3-s1gw-test/S1GW_Tests.cfg new file mode 100644 index 0000000..a831fa8 --- /dev/null +++ b/ttcn3-s1gw-test/S1GW_Tests.cfg @@ -0,0 +1,16 @@ +[ORDERED_INCLUDE] +"/osmo-ttcn3-hacks/Common.cfg" +"/osmo-ttcn3-hacks/s1gw/S1GW_Tests.default" + +[LOGGING] + +[TESTPORT_PARAMETERS] + +[MODULE_PARAMETERS] +S1GW_Tests.mp_s1gw_ip := "172.18.10.100"; +S1GW_Tests.mp_mme_bind_ip := "172.18.10.101"; + +[MAIN_CONTROLLER] + +[EXECUTE] +S1GW_Tests.control diff --git a/ttcn3-s1gw-test/jenkins.sh b/ttcn3-s1gw-test/jenkins.sh new file mode 100755 index 0000000..9fcf5f1 --- /dev/null +++ b/ttcn3-s1gw-test/jenkins.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +. ../jenkins-common.sh +IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}" +docker_images_require \ + "osmo-s1gw-$IMAGE_SUFFIX" \ + "ttcn3-s1gw-test" + +set_clean_up_trap +set -e + +mkdir $VOL_BASE_DIR/s1gw-tester +cp S1GW_Tests.cfg $VOL_BASE_DIR/s1gw-tester/ +write_mp_osmo_repo "$VOL_BASE_DIR/s1gw-tester/S1GW_Tests.cfg" + +mkdir $VOL_BASE_DIR/s1gw +cp osmo-s1gw.config $VOL_BASE_DIR/s1gw/ + +network_create +network_replace_subnet_in_configs + +echo "Starting container with osmo-s1gw" +docker run --rm \ + $(docker_network_params $SUBNET 100) \ + --ulimit core=-1 \ + -v $VOL_BASE_DIR/s1gw:/data \ + --name ${BUILD_TAG}-s1gw -d \ + $DOCKER_ARGS \ + $REPO_USER/osmo-s1gw-$IMAGE_SUFFIX + +# Give some time to osmo-s1gw to be fully started; it's a bit slow... +sleep 2 + +echo "Starting container with the S1GW testsuite" +docker run --rm \ + $(docker_network_params $SUBNET 101) \ + --ulimit core=-1 \ + -e "TTCN3_PCAP_PATH=/data" \ + -v $VOL_BASE_DIR/s1gw-tester:/data \ + --name ${BUILD_TAG}-ttcn3-s1gw-test \ + $DOCKER_ARGS \ + $REPO_USER/ttcn3-s1gw-test diff --git a/ttcn3-s1gw-test/osmo-s1gw.config b/ttcn3-s1gw-test/osmo-s1gw.config new file mode 100644 index 0000000..4dabb8f --- /dev/null +++ b/ttcn3-s1gw-test/osmo-s1gw.config @@ -0,0 +1,34 @@ +%% -*- erlang -*- + +[%% ================================================================================ + %% application config + %% + %% eNB S1GW + %% +-----+ +----------------+ + %% | ... | --> | s1gw_bind_addr | MME + %% +-----+ +----------------+ +-----------------+ + %% | mme_loc_addr | --> | mme_rem_addr | + %% +----------------+ +-----------------+ + %% ================================================================================ + {osmo_s1gw, + [{s1gw_bind_addr, "172.18.10.100"}, %% S1GW bind address for incoming eNB connections + {mme_loc_addr, "172.18.10.100"}, %% local address for outgoing connections to the MME + {mme_rem_addr, "172.18.10.101"} %% remote address for outgoing connections to the MME + ]}, + %% ================================================================================ + %% kernel config + %% ================================================================================ + {kernel, + [{logger_level, debug}, + {logger, + [{handler, default, logger_std_h, + #{level => debug, + formatter => {logger_formatter, + #{template => [time, " ", + "[", level, "] ", + {pid, ["", pid, " "], ""}, + msg, + {mfa, [" (", mfa, ":", line, ")"], ""}, + "\n"]}}}}]}]}]. + +%% vim:set ts=2 sw=2 et: -- To view, visit https://gerrit.osmocom.org/c/docker-playground/+/37230?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Change-Id: I95000d7a9d778df1da830cd5059e5b6899391fbe Gerrit-Change-Number: 37230 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmocore[master]: codec: make osmo_hr_check_sid() more efficient
by falconia 13 Jun '24

13 Jun '24
Attention is currently required from: falconia. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/37227?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: codec: make osmo_hr_check_sid() more efficient ...................................................................... codec: make osmo_hr_check_sid() more efficient The operation of checking an HRv1 codec frame for the possibility of a perfect, error-free SID entails checking the last 79 bits out of 112, to see if they are all 1s. This operation can be done much more efficiently without using bitvec. Change-Id: Ib14204102c03c14d6c5aab42b0ffbef2c3dda3fd --- M src/codec/gsm620.c 1 file changed, 35 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/27/37227/2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/37227?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib14204102c03c14d6c5aab42b0ffbef2c3dda3fd Gerrit-Change-Number: 37227 Gerrit-PatchSet: 2 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in ...osmo-s1gw[master]: osmo_s1gw.app.src: add logger_color_formatter
by fixeria 13 Jun '24

13 Jun '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37228?usp=email ) Change subject: osmo_s1gw.app.src: add logger_color_formatter ...................................................................... osmo_s1gw.app.src: add logger_color_formatter This patch fixes 'FORMATTER CRASH' in the logging when running escript. Change-Id: I6f10b22af406ef640bc2eaa2dddca34b009f7e6a Fixes: c5d3c625 "Rework logging config, colorize output" --- M src/osmo_s1gw.app.src 1 file changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/erlang/osmo-s1gw refs/changes/28/37228/1 diff --git a/src/osmo_s1gw.app.src b/src/osmo_s1gw.app.src index bc2a8d7..6fd8174 100644 --- a/src/osmo_s1gw.app.src +++ b/src/osmo_s1gw.app.src @@ -6,7 +6,8 @@ {registered, []}, {applications, [ kernel, - stdlib + stdlib, + logger_color_formatter ]}, {modules, []}, {mod, {osmo_s1gw_app, []}}, -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37228?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I6f10b22af406ef640bc2eaa2dddca34b009f7e6a Gerrit-Change-Number: 37228 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmocore[master]: codec: make osmo_hr_check_sid() more efficient
by Jenkins Builder 13 Jun '24

13 Jun '24
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/37227?usp=email ) Change subject: codec: make osmo_hr_check_sid() more efficient ...................................................................... Patch Set 1: (1 comment) File src/codec/gsm620.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-16735): https://gerrit.osmocom.org/c/libosmocore/+/37227/comment/e40ff9b5_06c9dddd PS1, Line 281: {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; that open brace { should be on the previous line -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/37227?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib14204102c03c14d6c5aab42b0ffbef2c3dda3fd Gerrit-Change-Number: 37227 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Thu, 13 Jun 2024 20:59:45 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: codec: make osmo_hr_check_sid() more efficient
by falconia 13 Jun '24

13 Jun '24
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/37227?usp=email ) Change subject: codec: make osmo_hr_check_sid() more efficient ...................................................................... codec: make osmo_hr_check_sid() more efficient The operation of checking an HRv1 codec frame for the possibility of a perfect, error-free SID entails checking the last 79 bits out of 112, to see if they are all 1s. This operation can be done much more efficiently without using bitvec. Change-Id: Ib14204102c03c14d6c5aab42b0ffbef2c3dda3fd --- M src/codec/gsm620.c 1 file changed, 35 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/27/37227/1 diff --git a/src/codec/gsm620.c b/src/codec/gsm620.c index ef1d3b9..0489748 100644 --- a/src/codec/gsm620.c +++ b/src/codec/gsm620.c @@ -23,8 +23,6 @@ #include <stdbool.h> #include <string.h> -#include <osmocom/core/bitvec.h> -#include <osmocom/core/utils.h> #include <osmocom/codec/codec.h> /* GSM HR unvoiced (mode=0) frames - subjective importance bit ordering */ @@ -270,21 +268,32 @@ * \param[in] rtp_payload Buffer with RTP payload * \param[in] payload_len Length of payload * \returns true if code word is found, false otherwise + * + * Note that this function checks only for a perfect, error-free SID. + * Unlike GSM 06.31 for FR or GSM 06.81 for EFR, GSM 06.41 spec for HR + * does not prescribe exact bit counting rules, hence detection of + * partially corrupted SID frames in downstream network elements + * without out-of-band indication is not possible. */ bool osmo_hr_check_sid(const uint8_t *rtp_payload, size_t payload_len) { - struct bitvec bv = { - .data = (uint8_t *)rtp_payload, - .data_len = payload_len, - }; + static const uint8_t all_ff_bytes[9] = + {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; - /* A SID frame is identified by a SID codeword consisting of 79 bits which are all 1, - * so we basically check if all bits in range r34..r112 (inclusive) are 1. */ - for (bv.cur_bit = 33; bv.cur_bit < bv.data_len * 8; bv.cur_bit++) - if (bitvec_get_bit_pos(&bv, bv.cur_bit) != ONE) - return false; + if (payload_len < GSM_HR_BYTES) + return false; - return true; + /* A SID frame is identified by a SID codeword consisting of 79 bits + * which are all 1, so we basically check if all bits in range + * r34..r112 (inclusive) are 1. However, given the position of + * these bits in the frame, the most efficient way to perform + * this check does not use any bit-level operations. */ + if ((rtp_payload[4] & 0x7F) != 0x7F) + return false; + if (memcmp(rtp_payload + 5, all_ff_bytes, 9) == 0) + return true; + else + return false; } /*! Reset the SID field of a potentially corrupted, but still valid GSM-HR -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/37227?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib14204102c03c14d6c5aab42b0ffbef2c3dda3fd Gerrit-Change-Number: 37227 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • ...
  • 157
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.