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

Comparing ircd-hybrid/branches/8.0.x/src/conf_parser.y (file contents):
Revision 1705 by michael, Sun Dec 23 14:50:38 2012 UTC vs.
Revision 1732 by michael, Fri Jan 11 12:57:19 2013 UTC

# Line 718 | Line 718 | serverinfo_max_clients: T_MAX_CLIENTS '=
718   {
719    if (conf_parser_ctx.pass == 2)
720    {
721    recalc_fdlimit(NULL);
722
721      if ($3 < MAXCLIENTS_MIN)
722      {
723        char buf[IRCD_BUFSIZE];
724 <      ircsprintf(buf, "MAXCLIENTS too low, setting to %d", MAXCLIENTS_MIN);
724 >
725 >      snprintf(buf, sizeof(buf), "MAXCLIENTS too low, setting to %d", MAXCLIENTS_MIN);
726        yyerror(buf);
727 +      ServerInfo.max_clients = MAXCLIENTS_MIN;
728      }
729      else if ($3 > MAXCLIENTS_MAX)
730      {
731        char buf[IRCD_BUFSIZE];
732 <      ircsprintf(buf, "MAXCLIENTS too high, setting to %d", MAXCLIENTS_MAX);
732 >
733 >      snprintf(buf, sizeof(buf), "MAXCLIENTS too high, setting to %d", MAXCLIENTS_MAX);
734        yyerror(buf);
735 +      ServerInfo.max_clients = MAXCLIENTS_MAX;
736      }
737      else
738        ServerInfo.max_clients = $3;

Diff Legend

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