forked from I2P_Developers/i2p.i2p
Update:
- Stub out support for clearnet su3 updating - PartialEepGet and SSLEepGet tweaks to support clearnet update - Remove proxy, key, and url config from /configupdate - More URI checks in UpdateRunner - Add su3 mime type - Move advanced setting to HelperBase
This commit is contained in:
@@ -5,6 +5,8 @@ import java.util.List;
|
||||
|
||||
import net.i2p.router.RouterContext;
|
||||
import net.i2p.update.*;
|
||||
import static net.i2p.update.UpdateType.*;
|
||||
import static net.i2p.update.UpdateMethod.*;
|
||||
|
||||
/**
|
||||
* <p>Handles the request to update the router by firing one or more
|
||||
@@ -38,10 +40,11 @@ class UpdateHandler implements Updater {
|
||||
*/
|
||||
public UpdateTask update(UpdateType type, UpdateMethod method, List<URI> updateSources,
|
||||
String id, String newVersion, long maxTime) {
|
||||
if ((type != UpdateType.ROUTER_SIGNED && type != UpdateType.ROUTER_SIGNED_SU3) ||
|
||||
method != UpdateMethod.HTTP || updateSources.isEmpty())
|
||||
if ((type != ROUTER_SIGNED && type != ROUTER_SIGNED_SU3) ||
|
||||
( method != HTTP && method != HTTP_CLEARNET && method != HTTPS_CLEARNET) ||
|
||||
updateSources.isEmpty())
|
||||
return null;
|
||||
UpdateRunner update = new UpdateRunner(_context, _mgr, type, updateSources);
|
||||
UpdateRunner update = new UpdateRunner(_context, _mgr, type, method, updateSources);
|
||||
// set status before thread to ensure UI feedback
|
||||
_mgr.notifyProgress(update, "<b>" + _mgr._("Updating") + "</b>");
|
||||
return update;
|
||||
|
||||
Reference in New Issue
Block a user