changeset 1070:16379795f80b pam

Fix merge again. ses.loop_handler is required for PAM
author Matt Johnston <matt@ucc.asn.au>
date Mon, 16 Mar 2015 22:10:30 +0800
parents 2fa71c3b2827
children 696205e3dc99
files cli-session.c common-session.c session.h svr-session.c
diffstat 4 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/cli-session.c	Mon Mar 16 21:34:05 2015 +0800
+++ b/cli-session.c	Mon Mar 16 22:10:30 2015 +0800
@@ -126,7 +126,7 @@
 
 	send_msg_kexinit();
 
-	session_loop(cli_sessionloop);
+	session_loop();
 
 	/* Not reached */
 
--- a/common-session.c	Mon Mar 16 21:34:05 2015 +0800
+++ b/common-session.c	Mon Mar 16 22:10:30 2015 +0800
@@ -242,8 +242,8 @@
 		}
 
 
-		if (loophandler) {
-			loophandler();
+		if (ses.loop_handler) {
+			ses.loop_handler();
 		}
 
 	} /* for(;;) */
--- a/session.h	Mon Mar 16 21:34:05 2015 +0800
+++ b/session.h	Mon Mar 16 22:10:30 2015 +0800
@@ -44,7 +44,7 @@
 extern int exitflag;
 
 void common_session_init(int sock_in, int sock_out);
-void session_loop(void(*loophandler)()) ATTRIB_NORETURN;
+void session_loop() ATTRIB_NORETURN;
 void session_cleanup();
 void send_session_identification();
 void send_msg_ignore();
--- a/svr-session.c	Mon Mar 16 21:34:05 2015 +0800
+++ b/svr-session.c	Mon Mar 16 22:10:30 2015 +0800
@@ -136,6 +136,8 @@
 
 	ses.isserver = 1;
 
+	ses.loop_handler = svr_sessionloop;
+
 	/* We're ready to go now */
 	sessinitdone = 1;
 
@@ -147,7 +149,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();
 
 	/* Not reached */