diff common-session.c @ 24:469950e86d0f

switching to global vars
author Matt Johnston <matt@ucc.asn.au>
date Tue, 20 Jul 2004 12:05:00 +0000
parents c1e5d9195402
children 0969767bca0d
line wrap: on
line diff
--- a/common-session.c	Wed Jun 23 07:24:22 2004 +0000
+++ b/common-session.c	Tue Jul 20 12:05:00 2004 +0000
@@ -35,14 +35,14 @@
 #include "channel.h"
 #include "atomicio.h"
 
-struct sshsession ses;
+struct sshsession ses; /* GLOBAL */
 
 /* need to know if the session struct has been initialised, this way isn't the
  * cleanest, but works OK */
-int sessinitdone = 0;
+int sessinitdone = 0; /* GLOBAL */
 
 /* this is set when we get SIGINT or SIGTERM, the handler is in main.c */
-int exitflag = 0;
+int exitflag = 0; /* GLOBAL */
 
 static int ident_readln(int fd, char* buf, int count);
 
@@ -51,7 +51,7 @@
 
 
 /* called only at the start of a session, set up initial state */
-void common_session_init(int sock, runopts *opts) {
+void common_session_init(int sock) {
 
 	TRACE(("enter session_init"));
 
@@ -61,8 +61,6 @@
 	ses.sock = sock;
 	ses.maxfd = sock;
 
-	ses.opts = opts;
-
 	ses.connecttimeout = 0;
 	
 	kexinitialise(); /* initialise the kex state */
@@ -128,7 +126,6 @@
 	}
 	
 	m_free(ses.session_id);
-	freerunopts(ses.opts);
 	m_burn(ses.keys, sizeof(struct key_context));
 	m_free(ses.keys);