[sword-svn] r3882 - in trunk: include src/mgr
scribe at crosswire.org
scribe at crosswire.org
Sun Aug 7 13:53:23 EDT 2022
Author: scribe
Date: 2022-08-07 13:53:23 -0400 (Sun, 07 Aug 2022)
New Revision: 3882
Modified:
trunk/include/installmgr.h
trunk/src/mgr/installmgr.cpp
Log:
Moved is chained source check inside 'is' guard
Added getter and initializer for new forgetInstallSource property
Modified: trunk/include/installmgr.h
===================================================================
--- trunk/include/installmgr.h 2022-08-07 12:40:11 UTC (rev 3881)
+++ trunk/include/installmgr.h 2022-08-07 17:53:23 UTC (rev 3882)
@@ -292,6 +292,7 @@
void setUnverifiedPeerAllowed(bool allowed) { this->unverifiedPeerAllowed = allowed; }
void setForgetInstallSource(bool forget) { this->forgetInstallSource = forget; }
bool isUnverifiedPeerAllowed() { return unverifiedPeerAllowed; }
+ bool isForgetInstallSource() { return forgetInstallSource; }
/** Request nicely to terminate an ongoing transfer.
* If threading is a concern, consider calling terminate() from your status reporters
Modified: trunk/src/mgr/installmgr.cpp
===================================================================
--- trunk/src/mgr/installmgr.cpp 2022-08-07 12:40:11 UTC (rev 3881)
+++ trunk/src/mgr/installmgr.cpp 2022-08-07 17:53:23 UTC (rev 3882)
@@ -100,6 +100,7 @@
passive = true;
timeoutMillis = 10000;
unverifiedPeerAllowed = true;
+ forgetInstallSource = false;
statusReporter = sr;
this->u = u;
this->p = p;
@@ -454,11 +455,11 @@
SWLOGD("***** modName: %s \n", modName);
InstallSource *packagePreference = 0;
- if (is->packagePreference && is->chainedSource) {
- packagePreference = is;
- is = is->chainedSource;
- }
if (is) {
+ if (is->packagePreference && is->chainedSource) {
+ packagePreference = is;
+ is = is->chainedSource;
+ }
sourceDir = (SWBuf)privatePath + "/" + is->uid;
sourceUID = is->uid;
sourceCaption = is->caption;
More information about the sword-cvs
mailing list