Opened 13 years ago
Closed 13 years ago
Last modified 13 years ago
#9950 closed Patch - Bug Fix (fixed)
[PATCH] DownloadManager SEGV after timeout
Reported by: | Owned by: | cpinkham | |
---|---|---|---|
Priority: | minor | Milestone: | 0.25 |
Component: | MythTV - General | Version: | Master Head |
Severity: | medium | Keywords: | DownloadManager SEGV |
Cc: | Ticket locked: | no |
Description
- Fix a SEGV that can occur if a download times out. If a caller makes a synchronous call then downloadNow will timeout after 10 seconds but downloadFinished, which is a slot, can be called after control has returned to the caller and the QByteArray data buffer has been deallocated.
- Allow the caller to set their own User-Agent header.
- Provide better error reporting.
Attachments (1)
Change History (6)
Changed 13 years ago by
Attachment: | 0001-DownloadManager-Fix-SEGV-after-timeout.patch added |
---|
comment:1 Changed 13 years ago by
Owner: | set to cpinkham |
---|---|
Status: | new → assigned |
comment:2 Changed 13 years ago by
comment:3 Changed 13 years ago by
Milestone: | unknown → 0.25 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Fix a potential segfault if MDM::downloadNow() times out.
Reset the destination QByteArray pointer after a download timeout to make sure the downloadFinished() callback doesn't try to write to it after it has been deallocated.
Closes #9950
I'm leaving part 2 of #9950 uncommitted for now since we do not need or use this functionality internally.
Signed-off-by: Chris Pinkham <cpinkham@…>
Branch: master Changeset: db25a2885364d4d1b2198056f7a477f60cb395d6
comment:4 Changed 13 years ago by
Part 2 is of interest for implementing MHEG InteractionChannel? i.e. BBC iPlayer functionality. The spec mandates that the client set the User-Agent to a specific form. That said, there are a number of other chages to do with cache querying that would be required too.
comment:5 Changed 13 years ago by
When you have the MHEG InterationChannel? patch ready, you can resubmit the User-Agent change to MythDownloadManager? with it and we can apply that functionality along with the code that uses it at the same time.
Improvements to MythDownloadManager? error reporting.
Refs #9950
Signed-off-by: Chris Pinkham <cpinkham@…>