Opened 10 years ago
Closed 10 years ago
Last modified 10 years ago
#12253 closed Patch - Bug Fix (fixed)
Patch - Use random temporary filename for schedules direct downloaded data
Reported by: | Owned by: | stuartm | |
---|---|---|---|
Priority: | minor | Milestone: | 0.28 |
Component: | MythTV - Mythfilldatabase | Version: | Master Head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
Reports on the mythtv-users list indicated that there were cases where if users incorrectly used multiple different usernames while running mythfilldatabase (directly, or indirectly), there were conditions where the schedules direct download data file was not properly cleaned up, resulting in not updating the program schedules.
It appears that while a unique temporary directory is created for schedules direct data is created, it is not used for the mythtv_ddp_data file in some cases (non-shared lineups).
This patch adddresses the use of static filename in this case by using both the random temporary directory prefix, and using a random file name (there are code paths where a temporary directory might not be created).
It seems that this code should be refactored, but since all this code would (ideally) be eliminated with a move to using a xmltv feed, this patch seems like a minimal fix, duplicating existing methods for temporary files and directories in the library.
Ticket #12251 (which should be applied before this patch) provides additional logging to report various errors, and is a prereq for this patch, although (it is hoped) that this patch makes it far less likely that the errors causing the issues would be encountered to be reported/logged.
*NOTE* that there is a missing part to the this patch. The patch (as provided) does not bump the ABI version. Since this ticket may remain under review for some time, I did not want to end up accidentally colliding with some later patch, or make it harder to apply at some future point. This results in a requirement for the developer who commits the patches to create a ABI bump patch.
github ref: https://github.com/garybuhrmaster/mythtv/commit/e5812009ed89e19c2565a96db314f822d78ae455 github git-am ref: https://github.com/garybuhrmaster/mythtv/commit/e5812009ed89e19c2565a96db314f822d78ae455.patch
In 299141e0a69b706239beb35b096df9ed2cea8a7b/mythtv: