diff svr-chansession.c @ 572:8fd0ac8c8cab

Move remotehost into svr_ses structure since we can't look it up once we've forked (the connection socket has been closed). Fixes inetd mode.
author Matt Johnston <matt@ucc.asn.au>
date Sat, 05 Sep 2009 11:40:00 +0000
parents 6f472dc54da7
children 6cb1bd7be8b3
line wrap: on
line diff
--- a/svr-chansession.c	Wed Sep 02 15:17:14 2009 +0000
+++ b/svr-chansession.c	Sat Sep 05 11:40:00 2009 +0000
@@ -253,12 +253,9 @@
 
 static struct logininfo* 
 chansess_login_alloc(struct ChanSess *chansess) {
-	char *remotehost;
 	struct logininfo * li;
-	get_socket_address(ses.sock_in, NULL, NULL, &remotehost, NULL, 1);
 	li = login_alloc_entry(chansess->pid, ses.authstate.username,
-			remotehost, chansess->tty);
-	m_free(remotehost);	
+			svr_ses.remotehost, chansess->tty);
 	return li;
 }