Fix running daemon with --disable-sshd flag

Commit 9a701696ae moved SshKeyCacheImpl into system injector, however it
missed doing the same for case of NoSshKeyCache when the sshd daemon is
disabled.

Change-Id: Ic864e65131820c88131ba85326fd6c06e8a75df9
This commit is contained in:
Vladimir Berezniker
2013-01-30 22:05:20 -05:00
committed by David Pursehouse
parent ec3f06db87
commit dc6abce017
3 changed files with 20 additions and 3 deletions

View File

@@ -57,6 +57,7 @@ import com.google.gerrit.server.schema.SchemaUpdater;
import com.google.gerrit.server.schema.SchemaVersionCheck;
import com.google.gerrit.server.schema.UpdateUI;
import com.google.gerrit.server.ssh.NoSshModule;
import com.google.gerrit.server.ssh.NoSshKeyCache;
import com.google.gerrit.sshd.SshKeyCacheImpl;
import com.google.gerrit.sshd.SshModule;
import com.google.gerrit.sshd.commands.MasterCommandModule;
@@ -316,7 +317,11 @@ public class Daemon extends SiteProgram {
}
});
}
modules.add(SshKeyCacheImpl.module());
if (sshd) {
modules.add(SshKeyCacheImpl.module());
} else {
modules.add(NoSshKeyCache.module());
}
if (!slave) {
modules.add(new MasterNodeStartup());
}