version 1.75, 2000/06/17 19:24:34 |
version 1.76, 2000/06/17 20:30:10 |
|
|
/* Read other side\'s version identification. */ |
/* Read other side\'s version identification. */ |
for (;;) { |
for (;;) { |
for (i = 0; i < sizeof(buf) - 1; i++) { |
for (i = 0; i < sizeof(buf) - 1; i++) { |
int len = read(connection_in, &buf[i], 1); |
int len = atomicio(read, connection_in, &buf[i], 1); |
if (len < 0) |
if (len < 0) |
fatal("ssh_exchange_identification: read: %.100s", strerror(errno)); |
fatal("ssh_exchange_identification: read: %.100s", strerror(errno)); |
if (len != 1) |
if (len != 1) |
|
|
} |
} |
} |
} |
buf[sizeof(buf) - 1] = 0; |
buf[sizeof(buf) - 1] = 0; |
if (strncmp(buf, "SSH-", 4)) |
if (strncmp(buf, "SSH-", 4) == 0) |
break; |
break; |
debug("ssh_exchange_identification: %s", buf); |
debug("ssh_exchange_identification: %s", buf); |
} |
} |