/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1999-2010 The OpenLDAP Foundation.
+ * Copyright 1999-2012 The OpenLDAP Foundation.
* Portions Copyright 1999 Dmitry Kovalev.
* Portions Copyright 2002 Pierangelo Masarati.
* Portions Copyright 2004 Mark Adamson.
#ifdef BACKSQL_SYNCPROV
} else if ( ad == slap_schema.si_ad_entryCSN ) {
/*
- * support for syncrepl as producer...
+ * support for syncrepl as provider...
*/
#if 0
if ( !bsi->bsi_op->o_sync ) {
return BACKSQL_AVL_CONTINUE;
}
- Debug( LDAP_DEBUG_TRACE, "id: '%ld'\n", bsi->bsi_oc->bom_id, 0, 0 );
+ Debug( LDAP_DEBUG_TRACE, "id: '" BACKSQL_IDNUMFMT "'\n",
+ bsi->bsi_oc->bom_id, 0, 0 );
- rc = backsql_BindParamInt( sth, 1, SQL_PARAM_INPUT,
+ rc = backsql_BindParamNumID( sth, 1, SQL_PARAM_INPUT,
&bsi->bsi_oc->bom_id );
if ( rc != SQL_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE, "backsql_oc_get_candidates(): "
ber_str2bv_x( row.cols[ 1 ], 0, 1, &c_id->eid_keyval,
op->o_tmpmemctx );
#else /* ! BACKSQL_ARBITRARY_KEY */
- if ( lutil_atoulx( &c_id->eid_id, row.cols[ 0 ], 0 ) != 0 ) {
+ if ( BACKSQL_STR2ID( &c_id->eid_id, row.cols[ 0 ], 0 ) != 0 ) {
goto cleanup;
}
- if ( lutil_atoulx( &c_id->eid_keyval, row.cols[ 1 ], 0 ) != 0 ) {
+ if ( BACKSQL_STR2ID( &c_id->eid_keyval, row.cols[ 1 ], 0 ) != 0 ) {
goto cleanup;
}
#endif /* ! BACKSQL_ARBITRARY_KEY */
}
Debug(LDAP_DEBUG_TRACE, "backsql_search(): loading data "
- "for entry id=" BACKSQL_IDFMT " oc_id=%ld, keyval=" BACKSQL_IDFMT "\n",
+ "for entry id=" BACKSQL_IDFMT " oc_id=" BACKSQL_IDNUMFMT ", keyval=" BACKSQL_IDFMT "\n",
BACKSQL_IDARG(eid->eid_id),
eid->eid_oc_id,
BACKSQL_IDARG(eid->eid_keyval) );
#ifdef BACKSQL_SYNCPROV
if ( op->o_sync ) {
Operation op2 = *op;
- SlapReply rs2 = { 0 };
+ SlapReply rs2 = { REP_RESULT };
Entry *e = entry_alloc();
slap_callback cb = { 0 };