[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Follow-up: Re: Too many tokens?



John Morrissey wrote:
> 
> On Fri, 15 Mar 2002 18:35:58 -0500, I posted:
> % You're analysis is right on; the parser uses the compiled-in value of
> % MAXARGS in servers/slapd/config.c for the size of the token array. This
> % limit is per-config file. As a short-term fix, you can either:
> %
> % * bump MAXARGS up and recompile.
> % -or-
> % * break your objectclass definitions into separate files that are under
> %   the 500-token limit. It doesn't sound like this is much of an option for
> %   you.
> 
> HEAD has the same behavior in servers/{slapd,slurpd}/config.c. It's probably
> a good idea to make this dynamically growable. If someone could start me off
> in the right direction, I'd try to find time to patch HEAD.

MAXARGS is a macro defined in servers/{slapd,slurpd}/config.c
that is used to create an automatic array of char *; you might 
turn the array into a global, dynamically resized array starting
from MAXSIZE that is later changed to some value read from the
file; note that the config parsing file must start with some 
reasonable default (500 should suffice), and the change should 
take place carefully because while reading you're still using 
the values held in the array you realloc.

Pierangelo

-- 
Dr. Pierangelo Masarati               | voice: +39 02 2399 8309
Dip. Ing. Aerospaziale                | fax:   +39 02 2399 8334
Politecnico di Milano                 |
mailto:pierangelo.masarati@polimi.it
via La Masa 34, 20156 Milano, Italy   |
http://www.aero.polimi.it/~masarati