python: Use the unpublished fallback key lenght when outputing fallback keys
This commit is contained in:
parent
8c62046392
commit
85a2f47088
1 changed files with 2 additions and 2 deletions
|
@ -304,12 +304,12 @@ class Account(object):
|
||||||
to the client being offline and not replenishing the pool of one-time
|
to the client being offline and not replenishing the pool of one-time
|
||||||
keys.
|
keys.
|
||||||
"""
|
"""
|
||||||
out_length = lib.olm_account_fallback_key_length(self._account)
|
out_length = lib.olm_account_unpublished_fallback_key_length(self._account)
|
||||||
out_buffer = ffi.new("char[]", out_length)
|
out_buffer = ffi.new("char[]", out_length)
|
||||||
|
|
||||||
ret = lib.olm_account_unpublished_fallback_key(self._account, out_buffer, out_length)
|
ret = lib.olm_account_unpublished_fallback_key(self._account, out_buffer, out_length)
|
||||||
self._check_error(ret)
|
self._check_error(ret)
|
||||||
|
|
||||||
fallback_key = ffi.unpack(out_buffer, ret)
|
fallback_key = ffi.unpack(out_buffer, out_length)
|
||||||
|
|
||||||
return json.loads(fallback_key)
|
return json.loads(fallback_key)
|
||||||
|
|
Loading…
Reference in a new issue