/[svn]/ircd-hybrid/trunk/src/conf_parser.y
ViewVC logotype

Diff of /ircd-hybrid/trunk/src/conf_parser.y

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1784 by michael, Thu Jan 24 19:26:51 2013 UTC revision 1785 by michael, Sat Jan 26 22:40:55 2013 UTC
# Line 1293  class_entry: CLASS Line 1293  class_entry: CLASS
1293    class->active = 1;    class->active = 1;
1294    MyFree(class->name);    MyFree(class->name);
1295    class->name = xstrdup(block_state.class.buf);    class->name = xstrdup(block_state.class.buf);
   class->flags = block_state.flags.value;  
1296    class->ping_freq = block_state.ping_freq.value;    class->ping_freq = block_state.ping_freq.value;
1297    class->max_perip = block_state.max_perip.value;    class->max_perip = block_state.max_perip.value;
1298    class->con_freq = block_state.con_freq.value;    class->con_freq = block_state.con_freq.value;
   class->min_idle = block_state.min_idle.value;  
   class->max_idle = block_state.max_idle.value;  
1299    class->max_total = block_state.max_total.value;    class->max_total = block_state.max_total.value;
1300    class->max_global = block_state.max_global.value;    class->max_global = block_state.max_global.value;
1301    class->max_local = block_state.max_local.value;    class->max_local = block_state.max_local.value;
# Line 1306  class_entry: CLASS Line 1303  class_entry: CLASS
1303    class->max_sendq = block_state.max_sendq.value;    class->max_sendq = block_state.max_sendq.value;
1304    class->max_recvq = block_state.max_recvq.value;    class->max_recvq = block_state.max_recvq.value;
1305    
1306      if (block_state.min_idle.value > block_state.max_idle.value)
1307      {
1308        block_state.min_idle.value = 0;
1309        block_state.max_idle.value = 0;
1310        block_state.flags.value &= ~CLASS_FLAGS_FAKE_IDLE;
1311      }
1312    
1313      class->flags = block_state.flags.value;
1314      class->min_idle = block_state.min_idle.value;
1315      class->max_idle = block_state.max_idle.value;
1316    
1317    if (class->number_per_cidr && block_state.number_per_cidr.value)    if (class->number_per_cidr && block_state.number_per_cidr.value)
1318      if ((class->cidr_bitlen_ipv4 && block_state.cidr_bitlen_ipv4.value) ||      if ((class->cidr_bitlen_ipv4 && block_state.cidr_bitlen_ipv4.value) ||
1319          (class->cidr_bitlen_ipv6 && block_state.cidr_bitlen_ipv6.value))          (class->cidr_bitlen_ipv6 && block_state.cidr_bitlen_ipv6.value))
# Line 1416  class_number_per_cidr: NUMBER_PER_CIDR ' Line 1424  class_number_per_cidr: NUMBER_PER_CIDR '
1424    
1425  class_min_idle: MIN_IDLE '=' timespec ';'  class_min_idle: MIN_IDLE '=' timespec ';'
1426  {  {
1427    if (conf_parser_ctx.pass == 1)    if (conf_parser_ctx.pass != 1)
1428      block_state.min_idle.value = $3;      break;
1429    
1430      block_state.min_idle.value = $3;
1431      block_state.flags.value |= CLASS_FLAGS_FAKE_IDLE;
1432  };  };
1433    
1434  class_max_idle: MAX_IDLE '=' timespec ';'  class_max_idle: MAX_IDLE '=' timespec ';'
1435  {  {
1436    if (conf_parser_ctx.pass == 1)    if (conf_parser_ctx.pass != 1)
1437      block_state.max_idle.value = $3;      break;
1438    
1439      block_state.max_idle.value = $3;
1440      block_state.flags.value |= CLASS_FLAGS_FAKE_IDLE;
1441  };  };
1442    
1443  class_flags: IRCD_FLAGS  class_flags: IRCD_FLAGS
1444  {  {
1445    if (conf_parser_ctx.pass == 1)    if (conf_parser_ctx.pass == 1)
1446      block_state.flags.value = 0;      block_state.flags.value &= CLASS_FLAGS_FAKE_IDLE;
1447  } '='  class_flags_items ';';  } '='  class_flags_items ';';
1448    
1449  class_flags_items: class_flags_items ',' class_flags_item | class_flags_item;  class_flags_items: class_flags_items ',' class_flags_item | class_flags_item;

Legend:
Removed from v.1784  
changed lines
  Added in v.1785

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28