22 |
|
* $Id$ |
23 |
|
*/ |
24 |
|
#include "stdinc.h" |
25 |
< |
#include "tools.h" |
25 |
> |
#include "list.h" |
26 |
|
#include "s_bsd.h" |
27 |
|
#include "s_conf.h" |
28 |
|
#include "s_serv.h" |
29 |
|
#include "client.h" |
30 |
|
#include "common.h" |
31 |
|
#include "ircd.h" |
32 |
– |
#include "list.h" |
32 |
|
#include "parse.h" |
33 |
|
#include "fdlist.h" |
34 |
|
#include "packet.h" |
165 |
|
client_dopacket(client_p, readBuf, dolen); |
166 |
|
} |
167 |
|
} |
168 |
< |
else if(IsClient(client_p)) |
168 |
> |
else if (IsClient(client_p)) |
169 |
|
{ |
170 |
|
if (ConfigFileEntry.no_oper_flood && (IsOper(client_p) || IsCanFlood(client_p))) |
171 |
|
{ |
389 |
|
} |
390 |
|
|
391 |
|
/* |
392 |
+ |
* iorecv_default - append a packet to the recvq dbuf |
393 |
+ |
*/ |
394 |
+ |
void * |
395 |
+ |
iorecv_default(va_list args) |
396 |
+ |
{ |
397 |
+ |
struct Client *client_p = va_arg(args, struct Client *); |
398 |
+ |
int length = va_arg(args, int); |
399 |
+ |
char *buf = va_arg(args, char *); |
400 |
+ |
|
401 |
+ |
dbuf_put(&client_p->localClient->buf_recvq, buf, length); |
402 |
+ |
return NULL; |
403 |
+ |
} |
404 |
+ |
|
405 |
+ |
/* |
406 |
|
* read_packet - Read a 'packet' of data from a connection and process it. |
407 |
|
*/ |
408 |
|
void |
439 |
|
errno = EWOULDBLOCK; |
440 |
|
case SSL_ERROR_SYSCALL: |
441 |
|
break; |
442 |
+ |
case SSL_ERROR_SSL: |
443 |
+ |
if (errno == EAGAIN) |
444 |
+ |
break; |
445 |
|
default: |
446 |
|
length = errno = 0; |
447 |
|
} |
450 |
|
#endif |
451 |
|
{ |
452 |
|
length = recv(fd->fd, readBuf, READBUF_SIZE, 0); |
437 |
– |
#ifdef _WIN32 |
438 |
– |
if (length < 0) |
439 |
– |
errno = WSAGetLastError(); |
440 |
– |
#endif |
453 |
|
} |
454 |
|
|
455 |
|
if (length <= 0) |
473 |
|
client_p->since = CurrentTime; |
474 |
|
ClearPingSent(client_p); |
475 |
|
|
464 |
– |
dbuf_put(&client_p->localClient->buf_recvq, readBuf, length); |
465 |
– |
|
476 |
|
/* Attempt to parse what we have */ |
477 |
|
parse_client_queued(client_p); |
478 |
|
|