Commit f8c39585 authored by Aurel's avatar Aurel

fix max_gid definition for last packet

parent 9ec06c8d
...@@ -314,8 +314,13 @@ class SyncMLSubscription(XMLObject): ...@@ -314,8 +314,13 @@ class SyncMLSubscription(XMLObject):
first_call = False first_call = False
else: else:
min_gid = r[i] min_gid = r[i]
try:
max_gid = r[i+packet_size]
except IndexError:
# Last packet
max_gid = r[-1]
callback_method(min_gid=min_gid, callback_method(min_gid=min_gid,
max_gid=r[i+packet_size], max_gid=max_gid,
message_id=message_id_list.pop(), message_id=message_id_list.pop(),
activate_kw=activate_kw) activate_kw=activate_kw)
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment