#include <ac/string.h>
#include <ac/socket.h>
-#include "ldap_pvt.h"
#include "lutil.h"
#include "slap.h"
#include "../../libraries/liblber/lber-int.h" /* get ber_strndup() */
ber_init2( ber, 0, LBER_USE_DER );
ber_set_option( ber, LBER_OPT_BER_MEMCTX, &op->o_tmpmemctx );
- ctrls[num_ctrls] = sl_malloc ( sizeof ( LDAPControl ), op->o_tmpmemctx );
+ ctrls[num_ctrls] = slap_sl_malloc ( sizeof ( LDAPControl ), op->o_tmpmemctx );
for ( a = e->e_attrs; a != NULL; a = a->a_next ) {
AttributeDescription *desc = a->a_desc;
ber_free_buf( ber );
if ( ret < 0 ) {
-#ifdef NEW_LOGGING
- LDAP_LOG ( OPERATION, RESULTS,
- "slap_build_sync_ctrl: ber_flatten2 failed\n",
- 0, 0, 0 );
-#else
Debug( LDAP_DEBUG_TRACE,
"slap_build_sync_ctrl: ber_flatten2 failed\n",
0, 0, 0 );
-#endif
send_ldap_error( op, rs, LDAP_OTHER, "internal error" );
return ret;
}
ber_free_buf( ber );
if ( ret < 0 ) {
-#ifdef NEW_LOGGING
- LDAP_LOG ( OPERATION, RESULTS,
- "slap_build_sync_done_ctrl: ber_flatten2 failed\n",
- 0, 0, 0 );
-#else
Debug( LDAP_DEBUG_TRACE,
"slap_build_sync_done_ctrl: ber_flatten2 failed\n",
0, 0, 0 );
-#endif
send_ldap_error( op, rs, LDAP_OTHER, "internal error" );
return ret;
}
ber_free_buf( ber );
if ( ret < 0 ) {
-#ifdef NEW_LOGGING
- LDAP_LOG ( OPERATION, RESULTS,
- "slap_build_sync_ctrl: ber_flatten2 failed\n",
- 0, 0, 0 );
-#else
Debug( LDAP_DEBUG_TRACE,
"slap_build_sync_ctrl: ber_flatten2 failed\n",
0, 0, 0 );
-#endif
send_ldap_error( op, rs, LDAP_OTHER, "internal error" );
return ret;
}
ber_printf( ber, "N}" );
break;
default:
-#ifdef NEW_LOGGING
- LDAP_LOG ( OPERATION, RESULTS,
- "slap_send_syncinfo: invalid syncinfo type (%d)\n",
- type, 0, 0 );
-#else
Debug( LDAP_DEBUG_TRACE,
"slap_send_syncinfo: invalid syncinfo type (%d)\n",
type, 0, 0 );
-#endif
return LDAP_OTHER;
}
}
ret = ber_flatten2( ber, &rspdata, 0 );
if ( ret < 0 ) {
-#ifdef NEW_LOGGING
- LDAP_LOG ( OPERATION, RESULTS,
- "slap_send_syncinfo: ber_flatten2 failed\n",
- 0, 0, 0 );
-#else
Debug( LDAP_DEBUG_TRACE,
"slap_send_syncinfo: ber_flatten2 failed\n",
0, 0, 0 );
-#endif
send_ldap_error( op, rs, LDAP_OTHER, "internal error" );
return ret;
}