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

SQL backend C source error (ITS#2309)



Full_Name: Nikola Milutinovic
Version: 2.1.12
OS: Tru64 UNIX 4.0D
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (195.252.123.12)


File: ./servers/slapd/back-sql/init.c, line 34

bi.bi_init = backbacksql_initialize;

The problem is this name doesn't exist. I believe the correct line should be:

bi.bi_init = sql_back_initialize;

-----------------------------------------------
File: ./servers/slapd/back-sql/entry-id.c, line 439

Tru64 CC chokes on initializations in the form:

struct berval bv[ 2 ] = { bsi->oc->oc->soc_cname, BER_BVNULL };

saying that *that* first initializer is not constant value. Replacing it with
initialization in the code made semi-success:

bv[0] = bsi->oc->oc->soc_cname;
bv[1] = BER_BVNULL;

The second assignment failed, since "BER_BVNULL" is defined to "{ 0L, NULL }",
which is and initializer for an ARRAY, not a STRUCTURE, as far as I know. So,
the final step to the solution was to change the last assignment to this:

bv[1].bv_len = 0L;
bv[1].bv_val = NULL;

This worked.

Nix.