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/trunk/src/packet.c (file contents):
Revision 4576 by michael, Mon Aug 25 09:45:11 2014 UTC vs.
Revision 4588 by michael, Tue Aug 26 15:59:07 2014 UTC

# Line 124 | Line 124 | parse_client_queued(struct Client *clien
124   {
125    int dolen = 0;
126    int checkflood = 1;
127 <  struct Connection *lclient_p = client_p->localClient;
127 >  struct Connection *lclient_p = client_p->connection;
128  
129    if (IsUnknown(client_p))
130    {
# Line 231 | Line 231 | flood_endgrace(struct Client *client_p)
231    SetFloodDone(client_p);
232  
233    /* Drop their flood limit back down */
234 <  client_p->localClient->allow_read = MAX_FLOOD;
234 >  client_p->connection->allow_read = MAX_FLOOD;
235  
236    /* sent_parsed could be way over MAX_FLOOD but under MAX_FLOOD_BURST,
237     * so reset it.
238     */
239 <  client_p->localClient->sent_parsed = 0;
239 >  client_p->connection->sent_parsed = 0;
240   }
241  
242   /*
# Line 249 | Line 249 | void
249   flood_recalc(fde_t *fd, void *data)
250   {
251    struct Client *client_p = data;
252 <  struct Connection *lclient_p = client_p->localClient;
252 >  struct Connection *lclient_p = client_p->connection;
253  
254    /* allow a bursting client their allocation per second, allow
255     * a client whos flooding an extra 2 per second
# Line 333 | Line 333 | read_packet(fde_t *fd, void *data)
333        return;
334      }
335  
336 <    dbuf_put(&client_p->localClient->buf_recvq, readBuf, length);
336 >    dbuf_put(&client_p->connection->buf_recvq, readBuf, length);
337  
338 <    if (client_p->localClient->lasttime < CurrentTime)
339 <      client_p->localClient->lasttime = CurrentTime;
340 <    if (client_p->localClient->lasttime > client_p->localClient->since)
341 <      client_p->localClient->since = CurrentTime;
338 >    if (client_p->connection->lasttime < CurrentTime)
339 >      client_p->connection->lasttime = CurrentTime;
340 >    if (client_p->connection->lasttime > client_p->connection->since)
341 >      client_p->connection->since = CurrentTime;
342  
343      ClearPingSent(client_p);
344  
# Line 350 | Line 350 | read_packet(fde_t *fd, void *data)
350  
351      /* Check to make sure we're not flooding */
352      if (!(IsServer(client_p) || IsHandshake(client_p) || IsConnecting(client_p))
353 <        && (dbuf_length(&client_p->localClient->buf_recvq) >
354 <            get_recvq(&client_p->localClient->confs)))
353 >        && (dbuf_length(&client_p->connection->buf_recvq) >
354 >            get_recvq(&client_p->connection->confs)))
355      {
356        if (!(ConfigGeneral.no_oper_flood && HasUMode(client_p, UMODE_OPER)))
357        {
# Line 388 | Line 388 | client_dopacket(struct Client *client_p,
388    /*
389     * Update messages received
390     */
391 <  ++me.localClient->recv.messages;
392 <  ++client_p->localClient->recv.messages;
391 >  ++me.connection->recv.messages;
392 >  ++client_p->connection->recv.messages;
393  
394    /*
395     * Update bytes received
396     */
397 <  client_p->localClient->recv.bytes += length;
398 <  me.localClient->recv.bytes += length;
397 >  client_p->connection->recv.bytes += length;
398 >  me.connection->recv.bytes += length;
399  
400    parse(client_p, buffer, buffer + length);
401   }

Diff Legend

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