comparison common-session.c @ 1060:4c733310c21d nocircbuffer

reword comment for clarity
author Matt Johnston <matt@ucc.asn.au>
date Sun, 01 Mar 2015 23:26:42 +0800
parents c2a50c9f509e
children 2fa71c3b2827 10f198d4a308
comparison
equal deleted inserted replaced
1059:703c7cdd2577 1060:4c733310c21d
150 timeout.tv_usec = 0; 150 timeout.tv_usec = 0;
151 FD_ZERO(&writefd); 151 FD_ZERO(&writefd);
152 FD_ZERO(&readfd); 152 FD_ZERO(&readfd);
153 dropbear_assert(ses.payload == NULL); 153 dropbear_assert(ses.payload == NULL);
154 154
155 /* during initial setup we flush out the KEXINIT packet before 155 /* We delay reading from the input socket during initial setup until
156 * attempting to read the remote version string, which might block */ 156 after we have written out our initial KEXINIT packet (empty writequeue).
157 This means our initial packet can be in-flight while we're doing a blocking
158 read for the remote ident */
157 if (ses.sock_in != -1 && (ses.remoteident || isempty(&ses.writequeue))) { 159 if (ses.sock_in != -1 && (ses.remoteident || isempty(&ses.writequeue))) {
158 FD_SET(ses.sock_in, &readfd); 160 FD_SET(ses.sock_in, &readfd);
159 } 161 }
160 if (ses.sock_out != -1 && !isempty(&ses.writequeue)) { 162 if (ses.sock_out != -1 && !isempty(&ses.writequeue)) {
161 FD_SET(ses.sock_out, &writefd); 163 FD_SET(ses.sock_out, &writefd);