From fea7c52e9584ff117be8529b431b40590deef0ca Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Thu, 10 Apr 2014 18:58:08 -0400
Subject: [PATCH] Renamed SshContext->SshCommandContext for clarity of purpose

---
 src/main/java/com/gitblit/transport/ssh/SshDaemon.java |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/main/java/com/gitblit/transport/ssh/SshDaemon.java b/src/main/java/com/gitblit/transport/ssh/SshDaemon.java
index 4a2239b..81d7878 100644
--- a/src/main/java/com/gitblit/transport/ssh/SshDaemon.java
+++ b/src/main/java/com/gitblit/transport/ssh/SshDaemon.java
@@ -24,11 +24,8 @@
 import javax.inject.Singleton;
 
 import org.apache.sshd.SshServer;
-import org.apache.sshd.common.io.IoServiceFactory;
 import org.apache.sshd.common.io.IoServiceFactoryFactory;
-import org.apache.sshd.common.io.mina.MinaServiceFactory;
 import org.apache.sshd.common.io.mina.MinaServiceFactoryFactory;
-import org.apache.sshd.common.io.nio2.Nio2ServiceFactory;
 import org.apache.sshd.common.io.nio2.Nio2ServiceFactoryFactory;
 import org.apache.sshd.server.keyprovider.PEMGeneratorHostKeyProvider;
 import org.eclipse.jgit.internal.JGitText;
@@ -127,7 +124,7 @@
 				gitblit.getBaseFolder(), HOST_KEY_STORE).getPath()));
 		sshd.setPublickeyAuthenticator(publickeyAuthenticator);
 		sshd.setPasswordAuthenticator(new SshPasswordAuthenticator(gitblit));
-		sshd.setSessionFactory(new SshSessionFactory(idGenerator));
+		sshd.setSessionFactory(new SshSessionFactory());
 		sshd.setFileSystemFactory(new DisabledFilesystemFactory());
 		sshd.setTcpipForwardingFilter(new NonForwardingFilter());
 
@@ -145,9 +142,9 @@
 		root.registerDispatcher("gitblit", gitblitCmd);
 		root.registerDispatcher("git", gitCmd);
 
-		root.setRepositoryResolver(new RepositoryResolver<SshSession>(gitblit));
-		root.setUploadPackFactory(new GitblitUploadPackFactory<SshSession>(gitblit));
-		root.setReceivePackFactory(new GitblitReceivePackFactory<SshSession>(gitblit));
+		root.setRepositoryResolver(new RepositoryResolver<SshDaemonClient>(gitblit));
+		root.setUploadPackFactory(new GitblitUploadPackFactory<SshDaemonClient>(gitblit));
+		root.setReceivePackFactory(new GitblitReceivePackFactory<SshDaemonClient>(gitblit));
 		root.setAuthenticator(publickeyAuthenticator);
 
 		SshCommandFactory commandFactory = new SshCommandFactory(
@@ -187,9 +184,12 @@
 		sshd.start();
 		run.set(true);
 
+		String sshBackendStr = gitblit.getSettings().getString(Keys.git.sshBackend,
+				SshSessionBackend.NIO2.name());
+
 		log.info(MessageFormat.format(
-				"SSH Daemon is listening on {0}:{1,number,0}",
-				sshd.getHost(), sshd.getPort()));
+				"SSH Daemon ({0}) is listening on {1}:{2,number,0}",
+				sshBackendStr, sshd.getHost(), sshd.getPort()));
 	}
 
 	/** @return true if this daemon is receiving connections. */

--
Gitblit v1.9.1