# HG changeset patch # User Matt Johnston # Date 1153963479 0 # Node ID bf29e6659fb9994eed08801b96f825efe5179e17 # Parent ffbe6f691ca350f32cc938f9b2edfdf3a1acba2d Just use the normal "remote closed" handler when reading ident stings diff -r ffbe6f691ca3 -r bf29e6659fb9 common-session.c --- 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);