dse_read_file(struct dse *pdse, Slapi_PBlock *pb)
{
    int rc = 1; /* Good */
    int ii;
    char **filelist = 0;
    char *filename = 0;

    filelist = charray_dup(pdse->dse_filelist);
    filename = slapi_ch_strdup(pdse->dse_filename);

    for (ii = 0; rc && filelist && filelist[ii]; ++ii) {
        if (strcasecmp(filename, filelist[ii]) != 0) {
            rc = dse_read_one_file(pdse, filelist[ii], pb, 0 /* not primary */);
        }
    }

    if (rc) {
        rc = dse_read_one_file(pdse, filename, pb, 1 /* primary file */);
    }

    charray_free(filelist);
    slapi_ch_free((void **)&filename);

    return rc;
}
dse_read_file(struct dse *pdse, Slapi_PBlock *pb)
{
    int rc = 1;  
    int ii;
    char **filelist = 0;
    char *filename = 0;

    filelist = charray_dup(pdse->dse_filelist);
    filename = slapi_ch_strdup(pdse->dse_filename);

    for (ii = 0; rc && filelist && filelist[ii]; ++ii) {
        if (strcasecmp(filename, filelist[ii]) != 0) {
            rc = dse_read_one_file(pdse, filelist[ii], pb, 0  );
        }
    }

    if (rc) {
        rc = dse_read_one_file(pdse, filename, pb, 1  );
    }

    charray_free(filelist);
    slapi_ch_free((void **)&filename);

    return rc;
}