ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/packet.c
(Generate patch)

Comparing:
ircd-hybrid/src/packet.c (file contents), Revision 31 by knight, Sun Oct 2 20:34:05 2005 UTC vs.
ircd-hybrid-8/src/packet.c (file contents), Revision 1156 by michael, Tue Aug 9 20:29:20 2011 UTC

# Line 22 | Line 22
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"
# Line 37 | Line 36
36   #include "memory.h"
37   #include "hook.h"
38   #include "send.h"
40 #include "irc_getnameinfo.h"
39  
40   #define READBUF_SIZE 16384
41  
# Line 166 | Line 164 | parse_client_queued(struct Client *clien
164        client_dopacket(client_p, readBuf, dolen);
165      }
166    }
167 <  else if(IsClient(client_p))
167 >  else if (IsClient(client_p))
168    {
169      if (ConfigFileEntry.no_oper_flood && (IsOper(client_p) || IsCanFlood(client_p)))
170      {
# Line 390 | Line 388 | nodata:
388   }
389  
390   /*
391 + * iorecv_default - append a packet to the recvq dbuf
392 + */
393 + void *
394 + iorecv_default(va_list args)
395 + {
396 +  struct Client *client_p = va_arg(args, struct Client *);
397 +  int length = va_arg(args, int);
398 +  char *buf = va_arg(args, char *);
399 +
400 +  dbuf_put(&client_p->localClient->buf_recvq, buf, length);
401 +  return NULL;
402 + }
403 +
404 + /*
405   * read_packet - Read a 'packet' of data from a connection and process it.
406   */
407   void
# Line 426 | Line 438 | read_packet(fde_t *fd, void *data)
438              errno = EWOULDBLOCK;
439            case SSL_ERROR_SYSCALL:
440              break;
441 +          case SSL_ERROR_SSL:
442 +            if (errno == EAGAIN)
443 +              break;
444            default:
445              length = errno = 0;
446          }
# Line 434 | Line 449 | read_packet(fde_t *fd, void *data)
449   #endif
450      {
451        length = recv(fd->fd, readBuf, READBUF_SIZE, 0);
437 #ifdef _WIN32
438      if (length < 0)
439        errno = WSAGetLastError();
440 #endif
452      }
453  
454      if (length <= 0)
# Line 461 | Line 472 | read_packet(fde_t *fd, void *data)
472        client_p->since = CurrentTime;
473      ClearPingSent(client_p);
474  
464    dbuf_put(&client_p->localClient->buf_recvq, readBuf, length);
465
475      /* Attempt to parse what we have */
476      parse_client_queued(client_p);
477  

Comparing:
ircd-hybrid/src/packet.c (property svn:keywords), Revision 31 by knight, Sun Oct 2 20:34:05 2005 UTC vs.
ircd-hybrid-8/src/packet.c (property svn:keywords), Revision 1156 by michael, Tue Aug 9 20:29:20 2011 UTC

# Line 1 | Line 1
1 < "Id Revision"
1 > Id Revision

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)