#5356 closed Bug (fixed)
Only set CURLOPT_COOKIEFILE, if it exists
Reported by: | blueyed | Owned by: | jordan |
---|---|---|---|
Priority: | Normal | Milestone: | 2.80 |
Component: | libtransmission | Version: | 2.77 |
Severity: | Normal | Keywords: | |
Cc: |
Description
It looks like setting CURLOPT_COOKIEFILE in createEasy (web.c) is causing regular disk access (and therefore preventing the disks to shutdown).
I am seeing entries like the following when enabling the hibernate debug tool with a Synology Diskstation (syno_hibernate_debug_tool --enable 1):
kernel: [15382.650000] [/usr/local/transmission/var//cookies.txt] opened by pid 6752 [u:(/usr/local/transmission/bin/tra), comm:(transmission-da)]
As far as I can see, the COOKIEFILE is only used to read cookies from. Therefore it might be acceptable to require a restart of transmission in case you manually edit it?!
This way, transmission could check if the file exists during startup and only set the option in case a cookie file existed during startup.
There _might_ be a way to make the createEasy function check for the file's existence without actually hitting the disk (I could imagine that there are caches/methods which actually remember if a file has been created?!).
libcurl 7.24.0-1 is being installed on the system (via ipkg), but I am not sure, if there is another instance used by transmission?!
The strace output for the access is:
[pid X] open("/usr/local/transmission/var//cookies.txt", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
Change History (2)
comment:1 Changed 10 years ago by jordan
- Milestone changed from None Set to 2.80
- Status changed from new to assigned
comment:2 Changed 10 years ago by jordan
- Resolution set to fixed
- Status changed from assigned to closed
This is a good idea.