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 -----
  • December
  • 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

August 2024

  • 1 participants
  • 1478 discussions
[XS] Change in osmo-ci[master]: jobs/osmocom-depcheck: disable mail notifications
by osmith 10 Aug '24

10 Aug '24
osmith has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-ci/+/37770?usp=email ) Change subject: jobs/osmocom-depcheck: disable mail notifications ...................................................................... jobs/osmocom-depcheck: disable mail notifications This is a manually triggered job that users may use if they want to verify minimal versions of dependencies mentioned in configure.ac result in a successful build. Don't notify the mailing list about it. Change-Id: I49392e7b08200945b050108d63aa96e9bb4edb3d --- M jobs/osmocom-depcheck.yml 1 file changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/70/37770/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/37770?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I49392e7b08200945b050108d63aa96e9bb4edb3d Gerrit-Change-Number: 37770 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de>
1 0
0 0
[XS] Change in ...osmo-s1gw[master]: contrib/jenkins.sh: increase EUnit verbosity
by laforge 10 Aug '24

10 Aug '24
Attention is currently required from: fixeria. laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37731?usp=email ) Change subject: contrib/jenkins.sh: increase EUnit verbosity ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37731?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I3d2dfab52ad41b693d89ef9e8b99df5014b999cf Gerrit-Change-Number: 37731 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Mon, 05 Aug 2024 12:31:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in osmo-mgw[master]: mgcp_network: use an uint16_t to store the port number
by laforge 10 Aug '24

10 Aug '24
Attention is currently required from: dexter, neels. laforge has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/osmo-mgw/+/37776?usp=email ) Change subject: mgcp_network: use an uint16_t to store the port number ...................................................................... Patch Set 1: (1 comment) Commit Message: https://gerrit.osmocom.org/c/osmo-mgw/+/37776/comment/0308e198_ff696f5c?usp… : PS1, Line 10: byte 16 bit! -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/37776?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I392b07b243389a78d4ad1d784cdfdc28ec59b487 Gerrit-Change-Number: 37776 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 06 Aug 2024 15:33:59 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[S] Change in pysim[master]: ara_m: fix --apdu-filter setting
by dexter 10 Aug '24

10 Aug '24
dexter has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/37640?usp=email ) Change subject: ara_m: fix --apdu-filter setting ...................................................................... ara_m: fix --apdu-filter setting The code for the --apdu-filter commandline option is not yet finished. Let's finish it and make it work. Related: OS#6092 Change-Id: Ib5fb388972fde0d50c3db0082ebf40bcca404681 --- M pySim/ara_m.py 1 file changed, 15 insertions(+), 8 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved diff --git a/pySim/ara_m.py b/pySim/ara_m.py index 5544eed..71aa6d8 100644 --- a/pySim/ara_m.py +++ b/pySim/ara_m.py @@ -76,13 +76,13 @@ else: if len(do) % 8: return ValueError('Invalid non-modulo-8 length of APDU filter: %d' % len(do)) - self.decoded['apdu_filter'] = [] + self.decoded = {'apdu_filter': []} offset = 0 while offset < len(do): - self.decoded['apdu_filter'] += {'header': b2h(do[offset:offset+4]), - 'mask': b2h(do[offset+4:offset+8])} - self.decoded = res - return res + self.decoded['apdu_filter'] += [{'header': b2h(do[offset:offset+4]), + 'mask': b2h(do[offset+4:offset+8])}] + offset += 8 # Move offset to the beginning of the next apdu_filter object + return self.decoded def _to_bytes(self): if 'generic_access_rule' in self.decoded: @@ -332,7 +332,7 @@ apdu_grp.add_argument( '--apdu-always', action='store_true', help='APDU access is allowed') apdu_grp.add_argument( - '--apdu-filter', help='APDU filter: 4 byte CLA/INS/P1/P2 followed by 4 byte mask (8 hex bytes)') + '--apdu-filter', help='APDU filter: multiple groups of 8 hex bytes (4 byte CLA/INS/P1/P2 followed by 4 byte mask)') nfc_grp = store_ref_ar_do_parse.add_mutually_exclusive_group() nfc_grp.add_argument('--nfc-always', action='store_true', help='NFC event access is allowed') @@ -360,8 +360,15 @@ elif opts.apdu_always: ar_do_content += [{'apdu_ar_do': {'generic_access_rule': 'always'}}] elif opts.apdu_filter: - # TODO: multiple filters - ar_do_content += [{'apdu_ar_do': {'apdu_filter': [opts.apdu_filter]}}] + if len(opts.apdu_filter) % 16: + return ValueError('Invalid non-modulo-16 length of APDU filter: %d' % len(do)) + offset = 0 + apdu_filter = [] + while offset < len(opts.apdu_filter): + apdu_filter += [{'header': opts.apdu_filter[offset:offset+8], + 'mask': opts.apdu_filter[offset+8:offset+16]}] + offset += 16 # Move offset to the beginning of the next apdu_filter object + ar_do_content += [{'apdu_ar_do': {'apdu_filter': apdu_filter}}] if opts.nfc_always: ar_do_content += [{'nfc_ar_do': {'nfc_event_access_rule': 'always'}}] elif opts.nfc_never: -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37640?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ib5fb388972fde0d50c3db0082ebf40bcca404681 Gerrit-Change-Number: 37640 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
[XS] Change in ...osmo-s1gw[master]: [TEST] rebar.config: specify repository and tag for meck
by fixeria 10 Aug '24

10 Aug '24
fixeria has abandoned this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37787?usp=email ) Change subject: [TEST] rebar.config: specify repository and tag for meck ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37787?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: abandon Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: Id36eab57cf4dce723c8bbf2554c35fe85b6e2378 Gerrit-Change-Number: 37787 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder
1 0
0 0
[XS] Change in ...osmo_dia2gsup[master]: osmo_dia2gsup.service: use /etc/osmocom/osmo-dia2gsup.config
by osmith 10 Aug '24

10 Aug '24
Attention is currently required from: fixeria. osmith has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/37718?usp=email ) Change subject: osmo_dia2gsup.service: use /etc/osmocom/osmo-dia2gsup.config ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/37718?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: erlang/osmo_dia2gsup Gerrit-Branch: master Gerrit-Change-Id: I5ff07341597b2838bce0750a576e463addd2964f Gerrit-Change-Number: 37718 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Mon, 05 Aug 2024 07:42:57 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in ...osmo-s1gw[master]: contrib/jenkins.sh: increase EUnit verbosity
by fixeria 10 Aug '24

10 Aug '24
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37731?usp=email ) Change subject: contrib/jenkins.sh: increase EUnit verbosity ...................................................................... contrib/jenkins.sh: increase EUnit verbosity Change-Id: I3d2dfab52ad41b693d89ef9e8b99df5014b999cf --- M Makefile M contrib/jenkins.sh 2 files changed, 3 insertions(+), 2 deletions(-) Approvals: osmith: Looks good to me, approved laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/Makefile b/Makefile index 4482b2c..fdf454f 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ CONFIG ?= config/sys.config +EUNIT_ARGS ?= all: build @@ -18,7 +19,7 @@ rebar3 shell --config $(CONFIG) check: $(GEN_FILES) - rebar3 eunit + rebar3 eunit $(EUNIT_ARGS) analyze: $(GEN_FILES) rebar3 dialyzer diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index c738791..89c8b91 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -2,5 +2,5 @@ make clean make -make check +make check EUNIT_ARGS="-v" make analyze -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/37731?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: I3d2dfab52ad41b693d89ef9e8b99df5014b999cf Gerrit-Change-Number: 37731 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-ci[master]: osmo-s1gw: build debian pkgs, publish source tarballs
by fixeria 10 Aug '24

10 Aug '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/37773?usp=email ) Change subject: osmo-s1gw: build debian pkgs, publish source tarballs ...................................................................... osmo-s1gw: build debian pkgs, publish source tarballs Change-Id: Ia51a4815feb99fa3bf067090fec6f2ccd20ffdae Depends: osmo-s1gw.git I5446c70c1c1f232a2a45de60be7068cfd683a99c Related: SYS#7040 --- M jobs/gerrit-verifications.yml M jobs/osmocom-obs-nightly-asan.yml M scripts/common.sh M scripts/obs/lib/config.py M scripts/tarballs/publish-tarballs-for-tags.sh 5 files changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/73/37773/1 diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index a1a7c0c..712f3c9 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -210,7 +210,7 @@ - osmo-s1gw: repos_url: '{gerrit_url}/erlang/{repos}' gerrit_project: 'erlang/{repos}' - pipeline_binpkgs: "" + pipeline_binpkgs: "debian:12" cmd: '{docker_run} {docker_img_erlang} {timeout_cmd} /build/contrib/jenkins.sh' - osmo-e1-hardware: diff --git a/jobs/osmocom-obs-nightly-asan.yml b/jobs/osmocom-obs-nightly-asan.yml index a08eefd..e3bf098 100644 --- a/jobs/osmocom-obs-nightly-asan.yml +++ b/jobs/osmocom-obs-nightly-asan.yml @@ -23,8 +23,9 @@ # We only care about Osmocom packages that run in the TTCN-3 testsuites # for the asan repository. EXCLUDE_PACKAGES=" - erlang/osmo-epdg erlang/osmo_dia2gsup + erlang/osmo-epdg + erlang/osmo-s1gw osmo-bsc-nat osmo-fl2k osmo-gsm-manuals diff --git a/scripts/common.sh b/scripts/common.sh index fd216ca..b658b03 100644 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -145,7 +145,7 @@ strongswan-epdg) echo "$OSMO_GIT_URL_GITEA"/ims-volte-vowifi/strongswan ;; - osmo_dia2gsup|osmo-epdg) + osmo_dia2gsup|osmo-epdg|osmo-s1gw) echo "$OSMO_GIT_URL_GERRIT"/erlang/"$1" ;; *) diff --git a/scripts/obs/lib/config.py b/scripts/obs/lib/config.py index 7a568e8..5b919d9 100644 --- a/scripts/obs/lib/config.py +++ b/scripts/obs/lib/config.py @@ -49,6 +49,7 @@ projects_osmocom = [ "erlang/osmo_dia2gsup", "erlang/osmo-epdg", + "erlang/osmo-s1gw", "gapk", "libasn1c", "libgtpnl", diff --git a/scripts/tarballs/publish-tarballs-for-tags.sh b/scripts/tarballs/publish-tarballs-for-tags.sh index a3cbad1..09cd5cd 100755 --- a/scripts/tarballs/publish-tarballs-for-tags.sh +++ b/scripts/tarballs/publish-tarballs-for-tags.sh @@ -37,6 +37,7 @@ osmo-pcap osmo-pcu osmo-remsim + osmo-s1gw osmo-sgsn osmo-sip-connector osmo-smlc -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/37773?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ia51a4815feb99fa3bf067090fec6f2ccd20ffdae Gerrit-Change-Number: 37773 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-mgw[master]: mgcp_network: use an uint16_t to store the port number
by fixeria 10 Aug '24

10 Aug '24
Attention is currently required from: dexter, neels. fixeria has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/osmo-mgw/+/37776?usp=email ) Change subject: mgcp_network: use an uint16_t to store the port number ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/37776?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I392b07b243389a78d4ad1d784cdfdc28ec59b487 Gerrit-Change-Number: 37776 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 06 Aug 2024 17:52:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in pysim[master]: pySim-shell: improve fsdump
by dexter 10 Aug '24

10 Aug '24
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/37786?usp=email ) Change subject: pySim-shell: improve fsdump ...................................................................... pySim-shell: improve fsdump The export and the walk method that it is based on received some improvement recently. Let's now also improve fsdump. Change-Id: I4d2ef7b383025a5bbf122f18ecd51b7d73aaba14 --- M pySim-shell.py 1 file changed, 63 insertions(+), 101 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/86/37786/1 diff --git a/pySim-shell.py b/pySim-shell.py index 183fbb6..3a89f2d 100755 --- a/pySim-shell.py +++ b/pySim-shell.py @@ -633,118 +633,80 @@ raise RuntimeError( "unable to export %i dedicated files(s)%s" % (context['ERR'], exception_str_add)) - def fsdump_df(self, filename, context, as_json): - """Dump information about currently selected [A]DF""" - df = self._cmd.lchan.selected_file - df_path_list = df.fully_qualified_path(True) - df_path = df.fully_qualified_path_str(True) - - res = { - 'path': df_path_list, - } - - try: - if not self._cmd.lchan.selected_file_fcp_hex: - # An application without a real ADF (like ADF.ARA-M) / filesystem - return - - fcp_dec = self._cmd.lchan.selected_file_fcp - res['fcp_raw'] = str(self._cmd.lchan.selected_file_fcp_hex) - res['fcp'] = fcp_dec - - except SwMatchError as e: - res['error'] = { - 'sw_actual': e.sw_actual, - 'sw_expected': e.sw_expected, - 'message': e.description, + def __dump_file(self, filename, context, as_json): + """ Select and dump a single file (EF, DF or ADF) """ + file = self._cmd.lchan.get_file_by_name(filename) + if file: + res = { + 'path': file.fully_qualified_path(True) } - except Exception as e: - raise(e) - res['error'] = { - 'message': str(e) - } - - context['result']['files'][df_path] = res - - def fsdump_ef(self, filename, context, as_json): - """Select and dump a single elementary file (EF) """ - # TODO: this is very similar to export_ef(), but I couldn't really come up with a way to share - # code between the two. They only hypothetical option could be turn "export" into a mere - # post-processing / printing function that works on the fsdump-generated dict/json? - df = self._cmd.lchan.selected_file - - # The currently selected file (not the file we are going to export) - # must always be an ADF or DF. From this starting point we select - # the EF we want to export. - if not isinstance(df, CardDF): - raise RuntimeError("currently selected file %s is not a DF or ADF" % str(df)) - - df_path_list = df.fully_qualified_path(True) - df_path = df.fully_qualified_path_str(True) - df_path_fid = df.fully_qualified_path_str(False) - - file_str = df_path + "/" + str(filename) - - res = { - 'path': df_path_list + [str(filename)], - } + else: + # If this is called from self.__walk(), then it is ensured that the file exists. + raise RuntimeError("cannot dump, file %s does not exist in the file system tree" % filename) try: fcp_dec = self._cmd.lchan.select(filename, self._cmd) + # File control parameters (common for EF, DF and ADF files) + if not self._cmd.lchan.selected_file_fcp_hex: + # An application without a real ADF (like ADF.ARA-M) / filesystem + return + res['fcp_raw'] = str(self._cmd.lchan.selected_file_fcp_hex) res['fcp'] = fcp_dec - structure = self._cmd.lchan.selected_file_structure() - if structure == 'transparent': - if as_json: - result = self._cmd.lchan.read_binary_dec() - body = result[0] - else: - result = self._cmd.lchan.read_binary() - body = str(result[0]) - elif structure == 'cyclic' or structure == 'linear_fixed': - body = [] - # Use number of records specified in select response - num_of_rec = self._cmd.lchan.selected_file_num_of_rec() - if num_of_rec: - for r in range(1, num_of_rec + 1): - if as_json: - result = self._cmd.lchan.read_record_dec(r) - body.append(result[0]) - else: - result = self._cmd.lchan.read_record(r) - body.append(str(result[0])) - - # When the select response does not return the number of records, read until we hit the - # first record that cannot be read. - else: - r = 1 - while True: - try: + # File structure and contents (EF only) + if isinstance(self._cmd.lchan.selected_file, CardEF): + structure = self._cmd.lchan.selected_file_structure() + if structure == 'transparent': + if as_json: + result = self._cmd.lchan.read_binary_dec() + body = result[0] + else: + result = self._cmd.lchan.read_binary() + body = str(result[0]) + elif structure == 'cyclic' or structure == 'linear_fixed': + body = [] + # Use number of records specified in select response + num_of_rec = self._cmd.lchan.selected_file_num_of_rec() + if num_of_rec: + for r in range(1, num_of_rec + 1): if as_json: result = self._cmd.lchan.read_record_dec(r) body.append(result[0]) else: result = self._cmd.lchan.read_record(r) body.append(str(result[0])) - except SwMatchError as e: - # We are past the last valid record - stop - if e.sw_actual == "9402": - break - # Some other problem occurred - raise e - r = r + 1 - elif structure == 'ber_tlv': - tags = self._cmd.lchan.retrieve_tags() - body = {} - for t in tags: - result = self._cmd.lchan.retrieve_data(t) - (tag, l, val, remainer) = bertlv_parse_one(h2b(result[0])) - body[t] = b2h(val) - else: - raise RuntimeError('Unsupported structure "%s" of file "%s"' % (structure, filename)) - res['body'] = body + + # When the select response does not return the number of records, read until we hit the + # first record that cannot be read. + else: + r = 1 + while True: + try: + if as_json: + result = self._cmd.lchan.read_record_dec(r) + body.append(result[0]) + else: + result = self._cmd.lchan.read_record(r) + body.append(str(result[0])) + except SwMatchError as e: + # We are past the last valid record - stop + if e.sw_actual == "9402": + break + # Some other problem occurred + raise e + r = r + 1 + elif structure == 'ber_tlv': + tags = self._cmd.lchan.retrieve_tags() + body = {} + for t in tags: + result = self._cmd.lchan.retrieve_data(t) + (tag, l, val, remainer) = bertlv_parse_one(h2b(result[0])) + body[t] = b2h(val) + else: + raise RuntimeError('Unsupported structure "%s" of file "%s"' % (structure, filename)) + res['body'] = body except SwMatchError as e: res['error'] = { @@ -758,7 +720,7 @@ 'message': str(e) } - context['result']['files'][file_str] = res + context['result']['files'][file.fully_qualified_path_str(True)] = res fsdump_parser = argparse.ArgumentParser() fsdump_parser.add_argument( @@ -785,11 +747,11 @@ exception_str_add = "" if opts.filename: - self.__walk_action(self.fsdump_ef, opts.filename, context, **kwargs_export) + self.__walk_action(self.__dump_file, opts.filename, context, **kwargs_export) else: # export an entire subtree try: - self.__walk(0, self.fsdump_ef, self.fsdump_df, context, **kwargs_export) + self.__walk(0, self.__dump_file, self.__dump_file, context, **kwargs_export) except Exception as e: print("# Stopping early here due to exception: " + str(e)) print("#") -- To view, visit https://gerrit.osmocom.org/c/pysim/+/37786?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I4d2ef7b383025a5bbf122f18ecd51b7d73aaba14 Gerrit-Change-Number: 37786 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • ...
  • 148
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.