544 |
|
int count; |
545 |
|
char buf[AUTH_BUFSIZ + 1]; /* buffer to read auth reply into */ |
546 |
|
|
547 |
+ |
/* Why? |
548 |
+ |
* Well, recv() on many POSIX systems is a per-packet operation, |
549 |
+ |
* and we do not necessarily want this, because on lowspec machines, |
550 |
+ |
* the ident response may come back fragmented, thus resulting in an |
551 |
+ |
* invalid ident response, even if the ident response was really OK. |
552 |
+ |
* |
553 |
+ |
* So PLEASE do not change this code to recv without being aware of the |
554 |
+ |
* consequences. |
555 |
+ |
* |
556 |
+ |
* --nenolod |
557 |
+ |
*/ |
558 |
+ |
#ifndef _WIN32 |
559 |
+ |
len = read(fd->fd, buf, AUTH_BUFSIZ); |
560 |
+ |
#else |
561 |
|
len = recv(fd->fd, buf, AUTH_BUFSIZ, 0); |
562 |
+ |
#endif |
563 |
|
|
564 |
|
if (len < 0) |
565 |
|
{ |