117 |
|
request->client = client; |
118 |
|
request->timeout = CurrentTime + CONNECTTIMEOUT; |
119 |
|
|
120 |
< |
return (request); |
120 |
> |
return request; |
121 |
|
} |
122 |
|
|
123 |
|
/* |
135 |
|
*/ |
136 |
|
client->localClient->allow_read = MAX_FLOOD; |
137 |
|
comm_setflush(&client->localClient->fd, 1000, flood_recalc, client); |
138 |
+ |
|
139 |
|
if ((client->node.prev != NULL) || (client->node.next != NULL)) |
140 |
|
{ |
141 |
|
sendto_realops_flags(UMODE_ALL, L_OPER, |
147 |
|
} |
148 |
|
else |
149 |
|
dlinkAdd(client, &client->node, &global_client_list); |
150 |
+ |
|
151 |
+ |
client_p->since = client_p->lasttime = client_p->firsttime = CurrentTime; |
152 |
+ |
client_p->flags |= FLAGS_FINISHED_AUTH; |
153 |
+ |
|
154 |
|
read_packet(&client->localClient->fd, client); |
155 |
|
} |
156 |
|
|
549 |
|
int count; |
550 |
|
char buf[AUTH_BUFSIZ + 1]; /* buffer to read auth reply into */ |
551 |
|
|
552 |
+ |
/* Why? |
553 |
+ |
* Well, recv() on many POSIX systems is a per-packet operation, |
554 |
+ |
* and we do not necessarily want this, because on lowspec machines, |
555 |
+ |
* the ident response may come back fragmented, thus resulting in an |
556 |
+ |
* invalid ident response, even if the ident response was really OK. |
557 |
+ |
* |
558 |
+ |
* So PLEASE do not change this code to recv without being aware of the |
559 |
+ |
* consequences. |
560 |
+ |
* |
561 |
+ |
* --nenolod |
562 |
+ |
*/ |
563 |
+ |
#ifndef _WIN32 |
564 |
+ |
len = read(fd->fd, buf, AUTH_BUFSIZ); |
565 |
+ |
#else |
566 |
|
len = recv(fd->fd, buf, AUTH_BUFSIZ, 0); |
567 |
+ |
#endif |
568 |
|
|
569 |
|
if (len < 0) |
570 |
|
{ |