Commit Graph

34 Commits (2ea9f3d700b72efa1cd486fa89a749b04415d3c2)

Author SHA1 Message Date
Nat Goodspeed a55f88109f MAINT-3489: Gracefully handle missing downloaded installer file.
If a marker file indicates that an installer has been downloaded and verified
and is ready to install, but that installer file does not exist, log it and
revert to checking for update.
Also add logging to every code path that can remove the installer explicitly,
in case the missing installer is actually being killed off by some weird
sequence of state-machine transitions.
2013-11-26 17:18:28 -05:00
Oz Linden 3bb708d706 merge up to latest viewer-development for merge to 3.5.2 2013-04-19 14:42:56 -04:00
Graham Madarasz bf6182daa8 Update Mac and Windows breakpad builds to latest 2013-03-29 07:50:08 -07:00
Oz Linden 49ed1a4e32 finish changes to update handling, including notices of channel changes 2013-02-27 17:40:39 -05:00
Oz Linden cf1019859d add use of v1.1 update request protocol, with fallback to v1.0 2013-02-21 16:47:52 -05:00
Nat Goodspeed d29f920c22 CHOP-900: Use new apr_procattr_constrain_handle_set() extension.
Now LLProcess explicitly requests APR to limit the handles passed to any child
process, instead of wantonly passing whatever happens to be lying around the
parent process at the time.
This requires the latest APR build.
Also revert LLUpdateDownloader::Implementation::mDownloadStream to llofstream
(as in rev 1878a57aebd7) instead of apr_file_t*. Using APR for that file was a
Band-Aid -- a single whacked mole -- for the problem more systemically
addressed by apr_procattr_constrain_handle_set().
2012-05-09 19:55:26 -04:00
Nat Goodspeed 7079513c23 IQA-463: Add apr_file_open(APR_CREATE) flag for downloaded installer.
This handles the case when the target file doesn't exist, just as APR_TRUNCATE
handles the case when it does.
Strengthen error checks concerning downloaded installer file from
ll_apr_warn_status() to ll_apr_assert_status(). Failing to recognize (e.g.)
failure to open that file only leads to mysterious crashes down the road; this
removes the mystery.
2012-04-23 14:49:32 -04:00
Nat Goodspeed 78816bb156 IQA-463: Use APR file I/O for downloaded viewer installer .exe.
On Windows, calling CreateProcess(bInheritHandles=FALSE) is the wrong idea. In
that case, CreateProcess() passes NO handles -- even the files you've
explicitly designated as the child's stdin, stdout, stderr in the STARTUPINFO
struct! Remove LLProcess code to tweak bInheritHandles; we should also remove
the corresponding (useless) APR extension.
Instead, given that the Windows file-locking problem we've observed is
specific to the viewer installer .exe file downloaded by the background
updater logic, use APR file I/O for that specific file. Empirically, both
llofstream and std::ofstream seem to make the open file handle inheritable;
but apr_file_open() documentation says: "By default, the returned file
descriptor will not be inherited by child processes created by
apr_proc_create()." And indeed, it does appear to sidestep the locking problem.
2012-04-23 12:01:15 -04:00
Xiaohong Bao f082de03ff fix for SH-2845, SH-2846, SH-2847, SH-2851: curl crashes and out-of-memory crashes. 2012-01-12 16:36:56 -07:00
brad kittenbrink f95effdacf Better fix for CHOP-286 - reenabled bandwidth limits on linux now that we've fixed the freeze. 2010-12-17 15:59:51 -08:00
brad kittenbrink 63dec2a9b9 Temporary workaround for CHOP-286: bandwidth limits freeze the downloader thread on linux 2010-12-17 14:26:55 -08:00
Andrew A. de Laix 5b5d2c428c Record update version in download marker so it can be recalled if resumed in another viewer session. 2010-12-14 09:54:28 -08:00
Andrew A. de Laix 1924f1bbca no bandwidth limit for required downloads. 2010-12-10 11:26:23 -08:00
Andrew A. de Laix 3c3683b884 limit dowload bandwidth to 'Maximum bandwidth' setting 2010-12-07 15:41:31 -08:00
Andrew A. de Laix 4d861ef022 push required flag into download data for later use. 2010-12-07 14:32:37 -08:00
brad kittenbrink f705453823 Fix for coding standard violations and build error on windows. 2010-12-03 17:12:35 -08:00
Andrew A. de Laix 18dbbb4fa4 download progress events. 2010-12-01 14:42:12 -08:00
Mark Palange (Mani) 8c2026d6b7 CHOP-135 Bug fixes. 2010-11-18 21:57:27 -08:00
Andrew A. de Laix 74a60346b2 remove downloaded file on error. 2010-11-16 16:22:37 -08:00
Andrew A. de Laix 64876ea945 better error checking when writing downloaded file. 2010-11-16 09:43:23 -08:00
Andrew A. de Laix 1368a94f01 do not resume or install if current viewer version doesn't match the recorded version which started the process. 2010-11-12 12:23:30 -08:00
Andrew A. de Laix 94942671fa fix resume crash. 2010-11-10 15:23:26 -08:00
Andrew A. de Laix 5da253fdde Shut down thread if viewer closed while downloading; fix problem of download marker path failing to expand correctly because it was happening too early in start up. 2010-11-09 11:16:28 -08:00
Andrew A. de Laix 2cfcdfe2ff Fix some stream bugs that were affecting windows download and validation. 2010-11-09 09:14:50 -08:00
Andrew A. de Laix 169fe36f69 Automated merge with https://bitbucket.org/mani_linden/viewer-development/ 2010-11-05 16:00:29 -07:00
Andrew A. de Laix 02c362b8cc implement download cancel (untested). 2010-11-05 15:56:33 -07:00
brad kittenbrink a13acfc907 Fixed build error due to unreferenced local variable. 2010-11-05 15:08:27 -07:00
Mark Palange (Mani) 6f7183cd44 Fixed windows build error. 2010-11-05 13:56:36 -07:00
Andrew A. de Laix 9d7cdc17e3 resume feature (untested). 2010-11-05 11:12:54 -07:00
Andrew A. de Laix 4d1e45f20f added hash validation of downloaded file. 2010-11-04 17:14:12 -07:00
Andrew A. de Laix 191e164a50 some better error handling. 2010-11-04 15:49:19 -07:00
Andrew A. de Laix dfeb7abe5f checker working with v1.0 update protocol. 2010-11-04 14:08:14 -07:00
Andrew A. de Laix 7622ab9249 just barely working udate downloading service; missing little nicities like error checking and sill stuff like that. 2010-11-04 11:33:02 -07:00
Andrew A. de Laix be15180722 start of the downloader service. 2010-11-02 15:59:10 -07:00