Skip to content

Settings: do not rewrite an unchanged value shown in a larger unit - #3572

Merged
xirvik merged 1 commit into
Novik:masterfrom
xirvik:settings-memory-roundtrip
Nov 22, 2026
Merged

xirvik merged 1 commit into
Novik:masterfrom
xirvik:settings-memory-roundtrip

Conversation

@xirvik

@xirvik xirvik commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

The dialog shows max memory usage in MiB and the global rates in KiB/s, rounded up to a whole unit, and Save multiplied the field back and compared it with the exact value, so a value that is not a whole unit was rewritten on every Save: rtorrent 0.9.8's default pieces.memory.max of 13352332492 became 13352566784. Through rpc2.php the unchanged write also drew a fault from rtorrent's untrusted gate on every Save.

The conversions are now one table and one function, used to fill the field, and a field that still shows what was filled in is not sent.

The dialog shows max memory usage in MiB and the global rates in KiB/s,
rounded up to a whole unit, and Save multiplied the field back and
compared it with the exact value, so a value that is not a whole unit
was rewritten on every Save: rtorrent 0.9.8's default pieces.memory.max
of 13352332492 became 13352566784. Through rpc2.php the unchanged write
also drew a fault from rtorrent's untrusted gate on every Save.

The conversions are now one table and one function, used to fill the
field, and a field that still shows what was filled in is not sent.
@xirvik
xirvik merged commit 7702636 into Novik:master Nov 22, 2026
12 checks passed
@xirvik
xirvik deleted the settings-memory-roundtrip branch November 22, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant