dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/33837 )
Change subject: apdu/ts_102_221: extract channel number from dict before calling del_lchan ...................................................................... apdu/ts_102_221: extract channel number from dict before calling del_lchan When the method del_lchan is called, closed_channel_nr still contains a dict that contains the channel number under the key 'logical_channel_number'. This will lead to an exception. We must extact the channel number from the dict before we can use it with del_lchan. (See also created_channel_nr) Related: OS#6094 Change-Id: I399856bc227f17b66cdb4158a69a35d50ba222a7 --- M pySim/apdu/ts_102_221.py 1 file changed, 17 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/37/33837/1 diff --git a/pySim/apdu/ts_102_221.py b/pySim/apdu/ts_102_221.py index 3780c8a..2d3ad82 100644 --- a/pySim/apdu/ts_102_221.py +++ b/pySim/apdu/ts_102_221.py @@ -396,7 +396,7 @@ self.col_id = '%02u' % created_channel_nr return {'mode': mode, 'created_channel': created_channel_nr } elif mode == 'close_channel': - closed_channel_nr = self.cmd_dict['p2'] + closed_channel_nr = self.cmd_dict['p2']['logical_channel_number'] rs.del_lchan(closed_channel_nr) self.col_id = '%02u' % closed_channel_nr return {'mode': mode, 'closed_channel': closed_channel_nr } -- To view, visit https://gerrit.osmocom.org/c/pysim/+/33837 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I399856bc227f17b66cdb4158a69a35d50ba222a7 Gerrit-Change-Number: 33837 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pma...@sysmocom.de> Gerrit-MessageType: newchange