Skip to content

Commit

Permalink
fix cond_unlock for keys that do not fit in a single unlock message
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhrisca committed Feb 29, 2024
1 parent 60a38cb commit 60f0c59
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.21.9
current_version = 0.21.10
commit = True
tag = False

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dependencies = [
"traitlets>=5.9.0",
]
name = "pyxcp"
version = "0.21.9"
version = "0.21.10"
readme = "README.md"
description = "Universal Calibration Protocol for Python"
keywords = ["automotive", "ecu", "xcp", "asam", "autosar"]
Expand Down
2 changes: 1 addition & 1 deletion pyxcp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
from .transport import Usb

# if you update this manually, do not forget to update .bumpversion.cfg and pyproject.toml
__version__ = "0.21.9"
__version__ = "0.21.10"
5 changes: 2 additions & 3 deletions pyxcp/master/master.py
Original file line number Diff line number Diff line change
Expand Up @@ -1809,9 +1809,8 @@ def cond_unlock(self, resources=None):
offset = 0
while offset < total_length:
data = key[offset : offset + MAX_PAYLOAD]
key_length = len(data)
offset += key_length
self.unlock(key_length, data)
self.unlock(total_length-offset, data)
offset += len(data)
else:
raise SeedNKeyError("SeedAndKey DLL returned: {}".format(SeedNKeyResult(result).name))

Expand Down

0 comments on commit 60f0c59

Please sign in to comment.