Tallefer / prssr

Automatically exported from code.google.com/p/prssr
GNU General Public License v2.0
0 stars 0 forks source link

The program crashes when the feed, which requires authentication, does not respond in 12 seconds. #173

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  Add the feed, which requires authentication, and does not respond 
in 12 seconds (I use one of the commercial service, which generates the 
feed's content on fly).
2.  Update the feed.
The program should crash.

What version of the product are you using? On what operating system?
pRSSReader – 1.4.4
OS: Windows Mobile 6.1 professional

The problem is in the "BOOL CDownloader::OnAuthentication(LPVOID 
context)". It sets state to "DOWNLOAD_STATE_AUTHENTICATED" before the 
authentication is completed: the function 
"CDownloader::DoBasicAuthentication" does not expect it and returns "true" 
even when something goes wrong.
I propose to remove "State = DOWNLOAD_STATE_AUTHENTICATED;" from "BOOL 
CDownloader::OnAuthentication(LPVOID context)" function.

I also added the additional tweak allowing setting the timeout for getting 
feed's xml files. It controlled by "FeedResponseTimeout" DWORD value which 
can be created in "HKCU\Software\DaProfik\pRSSreader\Configuration" key. 
The value should contain the timeout in milliseconds.

The SVN patch and the changed source files are attached below.

I hope that the author will apply the changes, but everyone can download 
the exe file with this patch from
http://rapidshare.com/files/282671301/prssr-fixed.zip.html

Original issue reported on code.google.com by Dmitry.M...@gmail.com on 20 Sep 2009 at 4:20

Attachments: