Mercurial > prosody-hg
changeset 14018:7ffb2d3ab50b 13.0
util.datamanager: Include record length in header
In order to distinguish 32bit from 64bit architectures since they look
the same when truncated and little-endian.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 09 Dec 2025 21:41:34 +0100 |
| parents | f0b2a05bcedc |
| children | 625372ca6bfe f65302ea37b0 |
| files | util/datamanager.lua |
| diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util/datamanager.lua Fri Dec 19 14:49:50 2025 +0000 +++ b/util/datamanager.lua Tue Dec 09 21:41:34 2025 +0100 @@ -274,7 +274,7 @@ if string.packsize then index_fmt = "T"; -- offset to the end of the item, length can be derived from two index items index_item_size = string.packsize(index_fmt); - index_magic = string.pack(index_fmt, 7767639 + 1); -- Magic string: T9 for "prosody", version number + index_magic = string.pack(index_fmt, 7767639 + 2 + index_item_size); -- Magic string: T9 for "prosody", version number end local function list_append(username, host, datastore, data)
