]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/config.c
ITS#6132
[openldap] / servers / slapd / config.c
index 16e335e4047fccdc5afc67eb39daff59e438428c..1e18315f8c62a3dbb3181f65d487d8de2cfbd472 100644 (file)
@@ -86,7 +86,6 @@ int slapi_plugins_used = 0;
 
 static int fp_getline(FILE *fp, ConfigArgs *c);
 static void fp_getline_init(ConfigArgs *c);
-static int fp_parse_line(ConfigArgs *c);
 
 static char    *strtok_quote(char *line, char *sep, char **quote_ptr);
 static char *strtok_quote_ldif(char **line);
@@ -144,7 +143,7 @@ int config_check_vals(ConfigTable *Conf, ConfigArgs *c, int check_only ) {
        }
        if(Conf->min_args && (c->argc < Conf->min_args)) {
                snprintf( c->cr_msg, sizeof( c->cr_msg ), "<%s> missing <%s> argument",
-                       c->argv[0], Conf->what );
+                       c->argv[0], Conf->what ? Conf->what : "" );
                Debug(LDAP_DEBUG_CONFIG|LDAP_DEBUG_NONE, "%s: keyword %s\n", c->log, c->cr_msg, 0 );
                return(ARG_BAD_CONF);
        }
@@ -716,7 +715,7 @@ read_config_file(const char *fname, int depth, ConfigArgs *cf, ConfigTable *cft)
 
                c->argc = 0;
                ch_free( c->tline );
-               if ( fp_parse_line( c ) ) {
+               if ( config_fp_parse_line( c ) ) {
                        rc = 1;
                        goto done;
                }
@@ -1955,8 +1954,8 @@ fp_getline( FILE *fp, ConfigArgs *c )
        return(line[0] ? 1 : 0);
 }
 
-static int
-fp_parse_line(ConfigArgs *c)
+int
+config_fp_parse_line(ConfigArgs *c)
 {
        char *token;
        static char *const hide[] = {