diff svr-session.c @ 1139:43a8ea69b24c

Fix problem where auth timeout wasn't checked when waiting for ident
author Matt Johnston <matt@ucc.asn.au>
date Mon, 03 Aug 2015 21:59:40 +0800
parents 8e0280986710
children 64a50eac1030
line wrap: on
line diff
--- a/svr-session.c	Mon Aug 03 21:17:23 2015 +0800
+++ b/svr-session.c	Mon Aug 03 21:59:40 2015 +0800
@@ -88,22 +88,12 @@
 	svr_ses.childpidsize = 0;
 }
 
-static void
-svr_sessionloop() {
-	if (svr_ses.connect_time != 0 
-		&& monotonic_now() - svr_ses.connect_time >= AUTH_TIMEOUT) {
-		dropbear_close("Timeout before auth");
-	}
-}
-
 void svr_session(int sock, int childpipe) {
 	char *host, *port;
 	size_t len;
 
 	common_session_init(sock, sock);
 
-	svr_ses.connect_time = monotonic_now();;
-
 	/* Initialise server specific parts of the session */
 	svr_ses.childpipe = childpipe;
 #ifdef USE_VFORK
@@ -146,7 +136,7 @@
 
 	/* Run the main for loop. NULL is for the dispatcher - only the client
 	 * code makes use of it */
-	session_loop(svr_sessionloop);
+	session_loop(NULL);
 
 	/* Not reached */