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

Comparing ircd-hybrid/branches/8.2.x/src/hostmask.c (file contents):
Revision 4815 by michael, Sun Aug 24 10:24:47 2014 UTC vs.
Revision 4816 by michael, Sat Nov 1 15:29:49 2014 UTC

# Line 446 | Line 446 | find_conf_by_address(const char *name, s
446                       int fam, const char *username, const char *password, int do_match)
447   {
448    unsigned int hprecv = 0;
449 <  dlink_node *ptr = NULL;
449 >  dlink_node *node = NULL;
450    struct MaskItem *hprec = NULL;
451    struct AddressRec *arec = NULL;
452    int b;
# Line 459 | Line 459 | find_conf_by_address(const char *name, s
459      {
460        for (b = 128; b >= 0; b -= 16)
461        {
462 <        DLINK_FOREACH(ptr, atable[hash_ipv6(addr, b)].head)
462 >        DLINK_FOREACH(node, atable[hash_ipv6(addr, b)].head)
463          {
464 <          arec = ptr->data;
464 >          arec = node->data;
465  
466            if ((arec->type == type) &&
467                arec->precedence > hprecv &&
# Line 482 | Line 482 | find_conf_by_address(const char *name, s
482      {
483        for (b = 32; b >= 0; b -= 8)
484        {
485 <        DLINK_FOREACH(ptr, atable[hash_ipv4(addr, b)].head)
485 >        DLINK_FOREACH(node, atable[hash_ipv4(addr, b)].head)
486          {
487 <          arec = ptr->data;
487 >          arec = node->data;
488  
489            if ((arec->type == type) &&
490                arec->precedence > hprecv &&
# Line 509 | Line 509 | find_conf_by_address(const char *name, s
509  
510      while (1)
511      {
512 <        DLINK_FOREACH(ptr, atable[hash_text(p)].head)
512 >        DLINK_FOREACH(node, atable[hash_text(p)].head)
513          {
514 <          arec = ptr->data;
514 >          arec = node->data;
515            if ((arec->type == type) &&
516              arec->precedence > hprecv &&
517              (arec->masktype == HM_HOST) &&
# Line 530 | Line 530 | find_conf_by_address(const char *name, s
530        ++p;
531      }
532  
533 <    DLINK_FOREACH(ptr, atable[0].head)
533 >    DLINK_FOREACH(node, atable[0].head)
534      {
535 <      arec = ptr->data;
535 >      arec = node->data;
536  
537        if (arec->type == type &&
538            arec->precedence > hprecv &&
# Line 666 | Line 666 | delete_one_address_conf(const char *addr
666   {
667    int bits = 0;
668    uint32_t hv = 0;
669 <  dlink_node *ptr = NULL;
669 >  dlink_node *node = NULL;
670    struct irc_ssaddr addr;
671  
672    switch (parse_netmask(address, &addr, &bits))
# Line 686 | Line 686 | delete_one_address_conf(const char *addr
686        break;
687    }
688  
689 <  DLINK_FOREACH(ptr, atable[hv].head)
689 >  DLINK_FOREACH(node, atable[hv].head)
690    {
691 <    struct AddressRec *arec = ptr->data;
691 >    struct AddressRec *arec = node->data;
692  
693      if (arec->conf == conf)
694      {
# Line 713 | Line 713 | delete_one_address_conf(const char *addr
713   void
714   clear_out_address_conf(void)
715   {
716 <  dlink_node *ptr = NULL, *ptr_next = NULL;
716 >  dlink_node *node = NULL, *node_next = NULL;
717  
718    for (unsigned int i = 0; i < ATABLE_SIZE; ++i)
719    {
720 <    DLINK_FOREACH_SAFE(ptr, ptr_next, atable[i].head)
720 >    DLINK_FOREACH_SAFE(node, node_next, atable[i].head)
721      {
722 <      struct AddressRec *arec = ptr->data;
722 >      struct AddressRec *arec = node->data;
723  
724        /*
725         * We keep the temporary K-lines and destroy the permanent ones,
# Line 769 | Line 769 | hostmask_send_expiration(struct AddressR
769   void
770   hostmask_expire_temporary(void)
771   {
772 <  dlink_node *ptr = NULL, *ptr_next = NULL;
772 >  dlink_node *node = NULL, *node_next = NULL;
773  
774    for (unsigned int i = 0; i < ATABLE_SIZE; ++i)
775    {
776 <    DLINK_FOREACH_SAFE(ptr, ptr_next, atable[i].head)
776 >    DLINK_FOREACH_SAFE(node, node_next, atable[i].head)
777      {
778 <      struct AddressRec *arec = ptr->data;
778 >      struct AddressRec *arec = node->data;
779  
780        if (!arec->conf->until || arec->conf->until > CurrentTime)
781          continue;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines