laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/28770 )
Change subject: apdu/ts_102_221: SELECT: allow select of SELF
......................................................................
apdu/ts_102_221: SELECT: allow select of SELF
While in the pySim-shell, it's useful to filter the currently selected
file from the choice of available files for select, this doesn't apply
for the tracing case: It's perfectly valid for the UE to SELECT the
file that's already selected right now. The operation basically
becomes equivalent to a STATUS.
Change-Id: I1a20fb3ba70426333ac34448c6cb782c51363965
---
M pySim/apdu/ts_102_221.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/pySim/apdu/ts_102_221.py b/pySim/apdu/ts_102_221.py
index 769c38e..fb2f375 100644
--- a/pySim/apdu/ts_102_221.py
+++ b/pySim/apdu/ts_102_221.py
@@ -66,7 +66,7 @@
# iterate to next element in path
continue
else:
- sels = lchan.selected_file.get_selectables(['FIDS','MF','PARENT'])
+ sels = lchan.selected_file.get_selectables(['FIDS','MF','PARENT','SELF'])
if file_hex in sels:
if self.successful:
#print("\tSELECT %s" % sels[file_hex])
@@ -80,7 +80,7 @@
elif mode == 'df_ef_or_mf_by_file_id':
if len(self.cmd_data) != 2:
raise ValueError('Expecting a 2-byte FID')
- sels = lchan.selected_file.get_selectables(['FIDS','MF','PARENT'])
+ sels = lchan.selected_file.get_selectables(['FIDS','MF','PARENT','SELF'])
file_hex = b2h(self.cmd_data)
if file_hex in sels:
if self.successful:
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28770
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I1a20fb3ba70426333ac34448c6cb782c51363965
Gerrit-Change-Number: 28770
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/28768 )
Change subject: filesystem: We can select not just immediate parent DF but all ancestors
......................................................................
filesystem: We can select not just immediate parent DF but all ancestors
I didn't check the specs, but at least experience with real-world cards
(and modems) shows that it's not just permitted to select the immediate
parent DF, but all ancestors of the currently selected file.
So adjust the get_selectables() method to not just return the immediate
parent, but to recurse all the way up and report the FID of any ancestor
DF.
Change-Id: Ic9037aa9a13af6fb0c2c22b673aa4afa78575b49
---
M pySim/filesystem.py
1 file changed, 16 insertions(+), 2 deletions(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/pySim/filesystem.py b/pySim/filesystem.py
index 886a48d..a3d1122 100644
--- a/pySim/filesystem.py
+++ b/pySim/filesystem.py
@@ -194,6 +194,21 @@
sels.update({self.name: self})
return sels
+ def _get_parent_selectables(self, alias: Optional[str] = None, flags=[]) -> Dict[str, 'CardFile']:
+ sels = {}
+ if not self.parent or self.parent == self:
+ return sels
+ # add our immediate parent
+ if alias:
+ sels.update({alias: self.parent})
+ if self.parent.fid and (flags == [] or 'FIDS' in flags):
+ sels.update({self.parent.fid: self.parent})
+ if self.parent.name and (flags == [] or 'FNAMES' in flags):
+ sels.update({self.parent.name: self.parent})
+ # recurse to parents of our parent, but without any alias
+ sels.update(self.parent._get_parent_selectables(None, flags))
+ return sels
+
def get_selectables(self, flags=[]) -> Dict[str, 'CardFile']:
"""Return a dict of {'identifier': File} that is selectable from the current file.
@@ -210,8 +225,7 @@
sels = self._get_self_selectables('.', flags)
# we can always select our parent
if flags == [] or 'PARENT' in flags:
- if self.parent:
- sels = self.parent._get_self_selectables('..', flags)
+ sels.update(self._get_parent_selectables('..', flags))
# if we have a MF, we can always select its applications
if flags == [] or 'MF' in flags:
mf = self.get_mf()
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28768
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ic9037aa9a13af6fb0c2c22b673aa4afa78575b49
Gerrit-Change-Number: 28768
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/pysim/+/28769 )
Change subject: apdu/ts_102_221: SELECT: allow select of parent/ancestor DFs
......................................................................
apdu/ts_102_221: SELECT: allow select of parent/ancestor DFs
We need to pass the 'PARENT' flag to get_selectables() to be able
to track SELECT on any of the parent/ancestor DF FID.
Change-Id: Ia7ac627d5edccb97160c90688d720d887fad6ec7
---
M pySim/apdu/ts_102_221.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/pySim/apdu/ts_102_221.py b/pySim/apdu/ts_102_221.py
index 3597db8..769c38e 100644
--- a/pySim/apdu/ts_102_221.py
+++ b/pySim/apdu/ts_102_221.py
@@ -66,7 +66,7 @@
# iterate to next element in path
continue
else:
- sels = lchan.selected_file.get_selectables(['FIDS','MF'])
+ sels = lchan.selected_file.get_selectables(['FIDS','MF','PARENT'])
if file_hex in sels:
if self.successful:
#print("\tSELECT %s" % sels[file_hex])
@@ -80,7 +80,7 @@
elif mode == 'df_ef_or_mf_by_file_id':
if len(self.cmd_data) != 2:
raise ValueError('Expecting a 2-byte FID')
- sels = lchan.selected_file.get_selectables(['FIDS','MF'])
+ sels = lchan.selected_file.get_selectables(['FIDS','MF','PARENT'])
file_hex = b2h(self.cmd_data)
if file_hex in sels:
if self.successful:
1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28769
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ia7ac627d5edccb97160c90688d720d887fad6ec7
Gerrit-Change-Number: 28769
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
Attention is currently required from: pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-cbc/+/28786
to look at the new patch set (#3).
Change subject: vty: Add command to delete expired messages
......................................................................
vty: Add command to delete expired messages
Otherwise there's no way to remove expired messages, which keep filling
the expired list forever.
Change-Id: Ie7ed2d9ec8fc23cdc4cb007dce4150458085a6a3
---
M include/osmocom/cbc/cbc_message.h
M src/cbc_vty.c
M src/smscb_message_fsm.c
3 files changed, 28 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-cbc refs/changes/86/28786/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28786
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: Ie7ed2d9ec8fc23cdc4cb007dce4150458085a6a3
Gerrit-Change-Number: 28786
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/28756 )
Change subject: trxcon: use trxcon->fi as the context in L1CTL logging
......................................................................
Patch Set 8: Code-Review+1
(1 comment)
File src/host/trxcon/src/trxcon.c:
https://gerrit.osmocom.org/c/osmocom-bb/+/28756/comment/349ce020_b9365e4e
PS7, Line 392: l1c->log_prefix = talloc_strdup(l1c, trxcon->log_prefix);
> trxcon->log_prefix is a chunk that belongs to trxcon (parent context). […]
Yeah ok, I meant more memleak if talloc was not used. So, if it could be that l1c->log_prefix is already non null when we assign it here.
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28756
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I7b923cb21638e6afc38deb7766955b43e49b60bb
Gerrit-Change-Number: 28756
Gerrit-PatchSet: 8
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 26 Jul 2022 05:59:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/28793 )
Change subject: trxcon: send pending TRXC messages in trx_if_flush_ctrl()
......................................................................
Patch Set 3:
(1 comment)
Patchset:
PS2:
> So we want to send POWEROFF when a L1CTL connection is lost. […]
I think probably the best is to submit the POWEROFF command without enquiquing and throttling mechansim (1 command at a time?), bypassing the queue to make sure it is sent immediately. That's probably what we do at osmo-trx too?
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28793
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I16d748b5194d381af0cd5ba9dbd4bfb33fc7d233
Gerrit-Change-Number: 28793
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 26 Jul 2022 05:56:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/28794 )
Change subject: trxcon: trx_if_close(): power the transceiver off if needed
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/28794
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I9c5178907304b36ec3de0ee31b7f7a9ed2e31c16
Gerrit-Change-Number: 28794
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 26 Jul 2022 05:54:58 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment