Attention is currently required from: daniel, fixeria.
lynxis lazus has posted comments on this change. ( https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/34285?usp=email )
Change subject: gsup: implement a (re-)connect the GSUP link if it fails
......................................................................
Patch Set 2:
(2 comments)
File src/gsup_client.erl:
https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/34285/comment/e6702a28_…
PS2, Line 99:
> cosmetic: use tabs
we need to use an erlang formater. But so far most of the files are mixed between tabs and spaces.
https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/34285/comment/e33345e5_…
PS2, Line 99: Failed to
> This sentence looks incomplete: "failed to ..." do what? […]
Ack
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/34285?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: erlang/osmo_dia2gsup
Gerrit-Branch: master
Gerrit-Change-Id: Id531d202ded123786d7a41dd0d7c3695af59fc2d
Gerrit-Change-Number: 34285
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 07 Sep 2023 12:49:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/34327?usp=email )
Change subject: ss7: Rename internal APIs to avoid exporting them in so file
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/34327?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Ibb22c1dc1ec73fc574cc3d38664874114f681c37
Gerrit-Change-Number: 34327
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 07 Sep 2023 12:42:29 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin.
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/34327?usp=email )
Change subject: ss7: Rename internal APIs to avoid exporting them in so file
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/34327?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: Ibb22c1dc1ec73fc574cc3d38664874114f681c37
Gerrit-Change-Number: 34327
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 07 Sep 2023 12:42:10 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/34335?usp=email )
Change subject: commands: make method verify_binary and verify_record private
......................................................................
commands: make method verify_binary and verify_record private
The methods verify_binary and verify_record are only used internally
in class SimCardCommands, they can be both private methods. Also lets
move them above the method that uses them.
Related: OS#5714
Change-Id: I57c9af3d6ff45caa4378c400643b4ae1fa42ecac
---
M pySim/commands.py
1 file changed, 42 insertions(+), 28 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/35/34335/1
diff --git a/pySim/commands.py b/pySim/commands.py
index ab66392..477cb2b 100644
--- a/pySim/commands.py
+++ b/pySim/commands.py
@@ -188,6 +188,19 @@
chunk_offset += chunk_len
return total_data, sw
+ def __verify_binary(self, ef, data: str, offset: int = 0):
+ """Verify contents of transparent EF.
+
+ Args:
+ ef : string or list of strings indicating name or path of transparent EF
+ data : hex string of expected data
+ offset : byte offset in file from which to start verifying
+ """
+ res = self.read_binary(ef, len(data) // 2, offset)
+ if res[0].lower() != data.lower():
+ raise ValueError('Binary verification failed (expected %s, got %s)' % (
+ data.lower(), res[0].lower()))
+
def update_binary(self, ef: Path, data: Hexstr, offset: int = 0, verify: bool = False,
conserve: bool = False) -> ResTuple:
"""Execute UPDATE BINARY.
@@ -227,22 +240,9 @@
total_data += data
chunk_offset += chunk_len
if verify:
- self.verify_binary(ef, data, offset)
+ self.__verify_binary(ef, data, offset)
return total_data, chunk_sw
- def verify_binary(self, ef, data: str, offset: int = 0):
- """Verify contents of transparent EF.
-
- Args:
- ef : string or list of strings indicating name or path of transparent EF
- data : hex string of expected data
- offset : byte offset in file from which to start verifying
- """
- res = self.read_binary(ef, len(data) // 2, offset)
- if res[0].lower() != data.lower():
- raise ValueError('Binary verification failed (expected %s, got %s)' % (
- data.lower(), res[0].lower()))
-
def read_record(self, ef: Path, rec_no: int) -> ResTuple:
"""Execute READ RECORD.
@@ -255,6 +255,19 @@
pdu = self.cla_byte + 'b2%02x04%02x' % (rec_no, rec_length)
return self._tp.send_apdu_checksw(pdu)
+ def __verify_record(self, ef: Path, rec_no: int, data: str):
+ """Verify record against given data
+
+ Args:
+ ef : string or list of strings indicating name or path of linear fixed EF
+ rec_no : record number to read
+ data : hex string of data to be verified
+ """
+ res = self.read_record(ef, rec_no)
+ if res[0].lower() != data.lower():
+ raise ValueError('Record verification failed (expected %s, got %s)' % (
+ data.lower(), res[0].lower()))
+
def update_record(self, ef: Path, rec_no: int, data: Hexstr, force_len: bool = False,
verify: bool = False, conserve: bool = False) -> ResTuple:
"""Execute UPDATE RECORD.
@@ -294,22 +307,9 @@
pdu = (self.cla_byte + 'dc%02x04%02x' % (rec_no, rec_length)) + data
res = self._tp.send_apdu_checksw(pdu)
if verify:
- self.verify_record(ef, rec_no, data)
+ self.__verify_record(ef, rec_no, data)
return res
- def verify_record(self, ef: Path, rec_no: int, data: str):
- """Verify record against given data
-
- Args:
- ef : string or list of strings indicating name or path of linear fixed EF
- rec_no : record number to read
- data : hex string of data to be verified
- """
- res = self.read_record(ef, rec_no)
- if res[0].lower() != data.lower():
- raise ValueError('Record verification failed (expected %s, got %s)' % (
- data.lower(), res[0].lower()))
-
def record_size(self, ef: Path) -> int:
"""Determine the record size of given file.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34335?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I57c9af3d6ff45caa4378c400643b4ae1fa42ecac
Gerrit-Change-Number: 34335
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange