This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/23696 ) Change subject: transport: Make all calls go through base class send_apdu_raw() ...................................................................... transport: Make all calls go through base class send_apdu_raw() This allows us to add APDU tracing at one central location in the code Change-Id: Id0593a2e6d846cc3151443f1022ae7ee030e6673 --- M pySim/transport/__init__.py M pySim/transport/calypso.py M pySim/transport/modem_atcmd.py M pySim/transport/pcsc.py M pySim/transport/serial.py 5 files changed, 5 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/pySim/transport/__init__.py b/pySim/transport/__init__.py index fb8f31d..923787b 100644 --- a/pySim/transport/__init__.py +++ b/pySim/transport/__init__.py @@ -68,7 +68,7 @@ data : string (in hex) of returned data (ex. "074F4EFFFF") sw : string (in hex) of status word (ex. "9000") """ - pass + return self._send_apdu_raw(pdu) def send_apdu(self, pdu): """Sends an APDU and auto fetch response data diff --git a/pySim/transport/calypso.py b/pySim/transport/calypso.py index 467d5ee..3c223e6 100644 --- a/pySim/transport/calypso.py +++ b/pySim/transport/calypso.py @@ -115,7 +115,7 @@ def wait_for_card(self, timeout = None, newcardonly = False): pass # Nothing to do really ... - def send_apdu_raw(self, pdu): + def _send_apdu_raw(self, pdu): # Request FULL reset req_msg = L1CTLMessageSIM(h2b(pdu)) diff --git a/pySim/transport/modem_atcmd.py b/pySim/transport/modem_atcmd.py index fccd388..f5a0f23 100644 --- a/pySim/transport/modem_atcmd.py +++ b/pySim/transport/modem_atcmd.py @@ -97,7 +97,7 @@ def wait_for_card(self, timeout=None, newcardonly=False): pass # Nothing to do really ... - def send_apdu_raw(self, pdu): + def _send_apdu_raw(self, pdu): # Prepare the command as described in 8.17 cmd = 'AT+CSIM=%d,\"%s\"' % (len(pdu), pdu) diff --git a/pySim/transport/pcsc.py b/pySim/transport/pcsc.py index f08f71a..2433e79 100644 --- a/pySim/transport/pcsc.py +++ b/pySim/transport/pcsc.py @@ -71,7 +71,7 @@ self.connect() return 1 - def send_apdu_raw(self, pdu): + def _send_apdu_raw(self, pdu): apdu = h2i(pdu) diff --git a/pySim/transport/serial.py b/pySim/transport/serial.py index 6d39303..22788a9 100644 --- a/pySim/transport/serial.py +++ b/pySim/transport/serial.py @@ -180,7 +180,7 @@ def _rx_byte(self): return self._sl.read() - def send_apdu_raw(self, pdu): + def _send_apdu_raw(self, pdu): pdu = h2b(pdu) data_len = ord(pdu[4]) # P3 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/23696 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Id0593a2e6d846cc3151443f1022ae7ee030e6673 Gerrit-Change-Number: 23696 Gerrit-PatchSet: 3 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210410/a916f737/attachment.htm>