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

Comparing ircd-hybrid-7.2/src/ircd_parser.y (file contents):
Revision 632 by michael, Thu Jun 1 10:53:00 2006 UTC vs.
Revision 671 by michael, Tue Jun 13 07:15:38 2006 UTC

# Line 1548 | Line 1548 | class_entry: CLASS
1548    if (ypass == 1)
1549    {
1550      yy_conf = make_conf_item(CLASS_TYPE);
1551 <    yy_class = (struct ClassItem *)map_to_conf(yy_conf);
1551 >    yy_class = map_to_conf(yy_conf);
1552    }
1553   } class_name_b '{' class_items '}' ';'
1554   {
1555    if (ypass == 1)
1556    {
1557 <    struct ConfItem *cconf;
1557 >    struct ConfItem *cconf = NULL;
1558      struct ClassItem *class = NULL;
1559  
1560      if (yy_class_name == NULL)
1561    {
1561        delete_conf_item(yy_conf);
1563    }
1562      else
1563      {
1564        cconf = find_exact_name_conf(CLASS_TYPE, yy_class_name, NULL, NULL);
1565  
1566        if (cconf != NULL)                /* The class existed already */
1567        {
1568 +        int user_count = 0;
1569 +
1570          rebuild_cidr_class(cconf, yy_class);
1571 <        class = (struct ClassItem *) map_to_conf(cconf);
1572 <        *class = *yy_class;
1571 >
1572 >        class = map_to_conf(cconf);
1573 >
1574 >        user_count = class->curr_user_count;
1575 >        memcpy(class, yy_class, sizeof(*class));
1576 >        class->curr_user_count = user_count;
1577 >        class->active = 1;
1578 >
1579          delete_conf_item(yy_conf);
1580  
1581          MyFree(cconf->name);            /* Allows case change of class name */
# Line 1579 | Line 1585 | class_entry: CLASS
1585        {
1586          MyFree(yy_conf->name);          /* just in case it was allocated */
1587          yy_conf->name = yy_class_name;
1588 +        yy_class->active = 1;
1589        }
1590      }
1591 +
1592      yy_class_name = NULL;
1593    }
1594   };

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines