fixed extracting reference flags for select
This commit is contained in:
@@ -223,6 +223,7 @@ REF = {
|
|||||||
"NUMBER_TO_LAST" : 0x05,
|
"NUMBER_TO_LAST" : 0x05,
|
||||||
"NUMBER_FROM_LAST" : 0x06,
|
"NUMBER_FROM_LAST" : 0x06,
|
||||||
"NUMBER_CONTROL" : 0x07,
|
"NUMBER_CONTROL" : 0x07,
|
||||||
"REFERENCE_CONTROL" : 0x07,
|
"REFERENCE_CONTROL_RECORD" : 0x07,
|
||||||
|
"REFERENCE_CONTROL_SELECT" : 0x03,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -656,7 +656,7 @@ class MF(DF):
|
|||||||
else:
|
else:
|
||||||
index_current = self.content.index(df)
|
index_current = self.content.index(df)
|
||||||
selected = self.select('dfname', data, p2 &
|
selected = self.select('dfname', data, p2 &
|
||||||
REF["REFERENCE_CONTROL"], index_current)
|
REF["REFERENCE_CONTROL_SELECT"], index_current)
|
||||||
else:
|
else:
|
||||||
logging.debug("unknown selection method: p1 =%s" % p1)
|
logging.debug("unknown selection method: p1 =%s" % p1)
|
||||||
selected = None
|
selected = None
|
||||||
@@ -934,7 +934,7 @@ class MF(DF):
|
|||||||
self.current = ef
|
self.current = ef
|
||||||
ef.resetRecordPointer()
|
ef.resetRecordPointer()
|
||||||
|
|
||||||
return ef, num_id, p2 & REF["REFERENCE_CONTROL"]
|
return ef, num_id, p2 & REF["REFERENCE_CONTROL_RECORD"]
|
||||||
|
|
||||||
def readRecordPlain(self, p1, p2, data):
|
def readRecordPlain(self, p1, p2, data):
|
||||||
"""
|
"""
|
||||||
@@ -1049,7 +1049,7 @@ class MF(DF):
|
|||||||
:returns: the status bytes as two byte long integer and the response
|
:returns: the status bytes as two byte long integer and the response
|
||||||
data as binary string.
|
data as binary string.
|
||||||
"""
|
"""
|
||||||
if p1 != 0 or (p2 & REF["REFERENCE_CONTROL"]) != 0:
|
if p1 != 0 or (p2 & REF["REFERENCE_CONTROL_RECORD"]) != 0:
|
||||||
raise SwError(SW["ERR_INCORRECTP1P2"])
|
raise SwError(SW["ERR_INCORRECTP1P2"])
|
||||||
ef, num_id, reference = self.recordHandlingDecode(p1, p2)
|
ef, num_id, reference = self.recordHandlingDecode(p1, p2)
|
||||||
sw = ef.appendrecord(data)
|
sw = ef.appendrecord(data)
|
||||||
|
|||||||
Reference in New Issue
Block a user