Opened 17 years ago

Closed 17 years ago

Last modified 16 years ago

#363 closed Defect (fixed)

Per-day time preferences work incorrectly

Reported by: Didactylos Owned by: davea
Priority: Major Milestone: 5.10
Component: Client - Daemon Version:
Keywords: time advanced-preferences preferences patch Cc:

Description

Per-day time preferences work incorrectly. An example: set Monday to process from 10:00-14:00. Leave the network times for Monday unspecified. This has the side-effect of forcing the network times for Monday to "Always".

Why does this happen? BOINC doesn't maintain separate preferences for CPU and network, they are both shoved into the same struct. It gets zeroed before use, and 0-0 means "Always". Because Monday is marked as "present", this 0-0 overrides the desired network times.

A secondary bug:

The advanced preferences dialog fails to always display the correct customised days. This can be reproduced by setting, say, a CPU time for Monday, and a network time for Thursday. Close the dialog, and the network time will have gone when you reopen the dialog. Perversely, the settings are saved correctly.

Attachments (1)

time.patch (30.0 KB) - added by Didactylos 17 years ago.
Patch for custom times bugs. (With a couple of corrections.)

Download all attachments as: .zip

Change History (9)

comment:1 Changed 17 years ago by Ageless

You don't say which version of BOINC this happens in.

Yet since you want it fixed by 5.10, have you tried any of the latest versions? A lot of fixes to the daily processor usage and network preferences have been done in 5.10.9 and above (Windows and Mac).

comment:2 Changed 17 years ago by Didactylos

These bugs are in HEAD, so far as I know. Since new features are still creeping into 5.10, there's plenty of room still to fix actual bugs. Also, this isn't a platform-specific bug.

I've found another: if you set a day to "always", it is explicitly not written out - the setting is completely ignored.

comment:3 Changed 17 years ago by Didactylos

The patch fixes all the bugs in this ticket, and also includes the day_prefs in global preferences, as well as the override (they were omitted in GLOBAL_PREFS::write()).

The XML format remains the same, but the semantics in GLOBAL_PREFS have been altered. The CPU and net connect times have been separated, so they can use the same week/timespan format. This significantly simplifies the code.

comment:4 Changed 17 years ago by Didactylos

Forgot the copy constructor. Colour me daft...

Changed 17 years ago by Didactylos

Attachment: time.patch added

Patch for custom times bugs. (With a couple of corrections.)

comment:5 Changed 17 years ago by charlief

Resolution: fixed
Status: newclosed

(In [13454]) Preferences: fix #363: per-day time preferences work incorrectly; MGR: use cached preferences if connected to pre-5.10.18 client..

comment:6 Changed 17 years ago by charlief

(In [13455]) Preferences: fix #363: per-day time preferences work incorrectly; MGR: use cached preferences if connected to pre-5.10.18 client.

comment:7 Changed 17 years ago by Nicolas

Keywords: patch added

comment:8 Changed 16 years ago by Didactylos

Keywords: advanced-preferences added; advanced_preferences removed
Note: See TracTickets for help on using tickets.