Update: Preliminary work for su3 router updates:

- new ROUTER_SIGNED_SU3 UpdateType
   - Add support for torrent and HTTP
   - Refactor UpdateRunners to return actual UpdateType
   - Deal with signed/su3 conflicts
   - unpack/verify stubbed only
This commit is contained in:
zzz
2013-09-22 18:03:56 +00:00
parent 6fede7f524
commit f47ec65b8f
17 changed files with 205 additions and 66 deletions

View File

@ -66,6 +66,8 @@ public class UpdateHandler {
_nonce.equals(System.getProperty("net.i2p.router.web.UpdateHandler.noncePrev"))) {
if (_action.contains("Unsigned")) {
update(ROUTER_UNSIGNED);
} else if (ConfigUpdateHandler.USE_SU3_UPDATE) {
update(ROUTER_SIGNED_SU3);
} else {
update(ROUTER_SIGNED);
}
@ -76,7 +78,8 @@ public class UpdateHandler {
ConsoleUpdateManager mgr = (ConsoleUpdateManager) _context.updateManager();
if (mgr == null)
return;
if (mgr.isUpdateInProgress(ROUTER_SIGNED) || mgr.isUpdateInProgress(ROUTER_UNSIGNED)) {
if (mgr.isUpdateInProgress(ROUTER_SIGNED) || mgr.isUpdateInProgress(ROUTER_UNSIGNED) ||
mgr.isUpdateInProgress(ROUTER_SIGNED_SU3)) {
_log.error("Update already running");
return;
}