(proto): be more careful and don't print errno when read() returns 0

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7141 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-10-14 08:04:20 +00:00
parent 2dbaacea74
commit 6fb65024a7

View File

@@ -467,10 +467,15 @@ proto (int s, int errsock,
return 1;
}
if (net_read (s, &reply, 1) != 1) {
ret = net_read (s, &reply, 1);
if (ret < 0) {
warn ("read");
close (errsock2);
return 1;
} else if (ret == 0) {
warnx ("unexpected EOF from %s", hostname);
close (errsock2);
return 1;
}
if (reply != 0) {