version 1.55, 2000/02/15 13:08:01 |
version 1.56, 2000/02/18 08:50:33 |
|
|
|
|
/* Read other side\'s version identification. */ |
/* Read other side\'s version identification. */ |
for (i = 0; i < sizeof(buf) - 1; i++) { |
for (i = 0; i < sizeof(buf) - 1; i++) { |
if (read(connection_in, &buf[i], 1) != 1) |
int len = read(connection_in, &buf[i], 1); |
|
if (len < 0) |
fatal("ssh_exchange_identification: read: %.100s", strerror(errno)); |
fatal("ssh_exchange_identification: read: %.100s", strerror(errno)); |
|
if (len != 1) |
|
fatal("ssh_exchange_identification: Connection closed by remote host"); |
if (buf[i] == '\r') { |
if (buf[i] == '\r') { |
buf[i] = '\n'; |
buf[i] = '\n'; |
buf[i + 1] = 0; |
buf[i + 1] = 0; |