diff common-session.c @ 344:bf29e6659fb9

Just use the normal "remote closed" handler when reading ident stings
author Matt Johnston <matt@ucc.asn.au>
date Thu, 27 Jul 2006 01:24:39 +0000
parents 7f9adaf85fca
children 70caa99bfe3a
line wrap: on
line diff
--- a/common-session.c	Sun Jul 09 14:58:19 2006 +0000
+++ b/common-session.c	Thu Jul 27 01:24:39 2006 +0000
@@ -229,7 +229,7 @@
 	/* write our version string, this blocks */
 	if (atomicio(write, ses.sock, LOCAL_IDENT "\r\n",
 				strlen(LOCAL_IDENT "\r\n")) == DROPBEAR_FAILURE) {
-		dropbear_exit("Error writing ident string");
+		ses.remoteclosed();
 	}
 
     /* If they send more than 50 lines, something is wrong */
@@ -250,7 +250,7 @@
 
 	if (!done) {
 		TRACE(("err: %s for '%s'\n", strerror(errno), linebuf))
-		dropbear_exit("Failed to get remote version");
+		ses.remoteclosed();
 	} else {
 		/* linebuf is already null terminated */
 		ses.remoteident = m_malloc(len);