33 |
|
* --Bleep Thomas Helvey <tomh@inxpress.net> |
34 |
|
*/ |
35 |
|
#include "stdinc.h" |
36 |
– |
#include "tools.h" |
36 |
|
#include "list.h" |
37 |
+ |
#include "ircd_defs.h" |
38 |
+ |
#include "fdlist.h" |
39 |
|
#include "s_auth.h" |
40 |
|
#include "s_conf.h" |
41 |
|
#include "balloc.h" |
42 |
|
#include "client.h" |
43 |
|
#include "common.h" |
44 |
|
#include "event.h" |
44 |
– |
#include "fdlist.h" /* fdlist_add */ |
45 |
|
#include "hook.h" |
46 |
|
#include "irc_string.h" |
47 |
|
#include "sprintf_irc.h" |
52 |
|
#include "s_bsd.h" |
53 |
|
#include "s_log.h" |
54 |
|
#include "send.h" |
55 |
< |
#include "memory.h" |
55 |
> |
|
56 |
|
|
57 |
|
static const char *HeaderMessages[] = { |
58 |
|
":%s NOTICE AUTH :*** Looking up your hostname...", |
458 |
|
return; |
459 |
|
} |
460 |
|
|
461 |
< |
if (getsockname(auth->client->localClient->fd.fd, (struct sockaddr *) &us, |
462 |
< |
(socklen_t *) &ulen) || |
463 |
< |
getpeername(auth->client->localClient->fd.fd, (struct sockaddr *) &them, |
464 |
< |
(socklen_t *) &tlen)) |
461 |
> |
if (getsockname(auth->client->localClient->fd.fd, (struct sockaddr *)&us, |
462 |
> |
&ulen) || |
463 |
> |
getpeername(auth->client->localClient->fd.fd, (struct sockaddr *)&them, |
464 |
> |
&tlen)) |
465 |
|
{ |
466 |
|
ilog(L_INFO, "auth get{sock,peer}name error for %s", |
467 |
|
get_client_name(auth->client, SHOW_IP)); |
525 |
|
* |
526 |
|
* --nenolod |
527 |
|
*/ |
528 |
– |
#ifndef _WIN32 |
528 |
|
len = read(fd->fd, buf, AUTH_BUFSIZ); |
529 |
< |
#else |
531 |
< |
len = recv(fd->fd, buf, AUTH_BUFSIZ, 0); |
532 |
< |
#endif |
533 |
< |
|
529 |
> |
|
530 |
|
if (len < 0) |
531 |
|
{ |
536 |
– |
#ifdef _WIN32 |
537 |
– |
errno = WSAGetLastError(); |
538 |
– |
#endif |
532 |
|
if (ignoreErrno(errno)) |
533 |
|
comm_setselect(fd, COMM_SELECT_READ, read_auth_reply, auth, 0); |
534 |
|
else |