mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-15 03:01:09 +08:00
Add get_ctrls()...
This commit is contained in:
parent
51d1c90887
commit
00086db3f6
@ -43,12 +43,10 @@ do_abandon(
|
||||
return LDAP_PROTOCOL_ERROR;
|
||||
}
|
||||
|
||||
#ifdef GET_CTRLS
|
||||
if( (rc = get_ctrls( conn, op, 0 )) != LDAP_SUCCESS ) {
|
||||
Debug( LDAP_DEBUG_ANY, "do_abandon: get_ctrls failed\n", 0, 0 ,0 );
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
|
||||
Debug( LDAP_DEBUG_ARGS, "do_abandon: id %d\n", id, 0 ,0 );
|
||||
|
||||
|
@ -110,13 +110,11 @@ do_add( Connection *conn, Operation *op )
|
||||
return LDAP_PROTOCOL_ERROR;
|
||||
}
|
||||
|
||||
#ifdef GET_CTRLS
|
||||
if( (rc = get_ctrls( conn, op, 1 )) != LDAP_SUCCESS ) {
|
||||
entry_free( e );
|
||||
Debug( LDAP_DEBUG_ANY, "do_add: get_ctrls failed\n", 0, 0, 0 );
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
|
||||
Statslog( LDAP_DEBUG_STATS, "conn=%d op=%d ADD dn=\"%s\"\n",
|
||||
conn->c_connid, op->o_opid, e->e_ndn, 0, 0 );
|
||||
|
@ -108,6 +108,8 @@ do_bind(
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
op->o_protocol = version;
|
||||
|
||||
if( method != LDAP_AUTH_SASL ) {
|
||||
tag = ber_scanf( ber, /*{*/ "o}", &cred );
|
||||
|
||||
@ -134,12 +136,10 @@ do_bind(
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
#ifdef GET_CTRLS
|
||||
if( (rc = get_ctrls( conn, op, 1 )) != LDAP_SUCCESS ) {
|
||||
Debug( LDAP_DEBUG_ANY, "do_bind: get_ctrls failed\n", 0, 0, 0 );
|
||||
goto cleanup;
|
||||
}
|
||||
#endif
|
||||
|
||||
if( method == LDAP_AUTH_SASL ) {
|
||||
Debug( LDAP_DEBUG_TRACE, "do_sasl_bind: dn (%s) mech %s\n",
|
||||
|
@ -58,14 +58,12 @@ do_compare(
|
||||
return rc;
|
||||
}
|
||||
|
||||
#ifdef GET_CTRLS
|
||||
if( ( rc = get_ctrls( conn, op, 1 )) != LDAP_SUCCESS ) {
|
||||
free( ndn );
|
||||
ava_free( &ava, 0 );
|
||||
Debug( LDAP_DEBUG_ANY, "do_compare: get_ctrls failed\n", 0, 0, 0 );
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
|
||||
value_normalize( ava.ava_value.bv_val, attr_syntax( ava.ava_type ) );
|
||||
|
||||
|
@ -51,13 +51,11 @@ do_delete(
|
||||
return rc;
|
||||
}
|
||||
|
||||
#ifdef GET_CTRLS
|
||||
if( ( rc = get_ctrls( conn, op, 1 ) ) != LDAP_SUCCESS ) {
|
||||
free( ndn );
|
||||
Debug( LDAP_DEBUG_ANY, "do_add: get_ctrls failed\n", 0, 0, 0 );
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
|
||||
Debug( LDAP_DEBUG_ARGS, "do_delete: dn (%s)\n", ndn, 0, 0 );
|
||||
|
||||
|
@ -180,6 +180,10 @@ SOURCE=.\connection.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\controls.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\daemon.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -142,14 +142,12 @@ do_modify(
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef GET_CTRLS
|
||||
if( (rc = get_ctrls( conn, op, 1 )) != LDAP_SUCCESS ) {
|
||||
free( ndn );
|
||||
modlist_free( modlist );
|
||||
Debug( LDAP_DEBUG_ANY, "do_modify: get_ctrls failed\n", 0, 0, 0 );
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
|
||||
Statslog( LDAP_DEBUG_STATS, "conn=%d op=%d MOD dn=\"%s\"\n",
|
||||
conn->c_connid, op->o_opid, ndn, 0, 0 );
|
||||
|
@ -21,10 +21,6 @@
|
||||
#include "ldap_defaults.h"
|
||||
#include "slap.h"
|
||||
|
||||
char *supportedControls[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
char *supportedExtensions[] = {
|
||||
NULL
|
||||
};
|
||||
|
@ -27,6 +27,9 @@ slap_op_free( Operation *op )
|
||||
if ( op->o_authmech != NULL ) {
|
||||
free( op->o_authmech );
|
||||
}
|
||||
if ( op->o_ctrls != NULL ) {
|
||||
ldap_controls_free( op->o_ctrls );
|
||||
}
|
||||
|
||||
ldap_pvt_thread_mutex_destroy( &op->o_abandonmutex );
|
||||
|
||||
@ -55,6 +58,7 @@ slap_op_alloc(
|
||||
op->o_dn = NULL;
|
||||
op->o_ndn = NULL;
|
||||
op->o_authmech = NULL;
|
||||
op->o_ctrls = NULL;
|
||||
|
||||
op->o_time = slap_get_time();
|
||||
op->o_opid = id;
|
||||
|
@ -104,12 +104,10 @@ do_search(
|
||||
goto return_results;
|
||||
}
|
||||
|
||||
#ifdef GET_CTRLS
|
||||
if( (rc = get_ctrls( conn, op, 1 )) != LDAP_SUCCESS ) {
|
||||
Debug( LDAP_DEBUG_ANY, "do_search: get_ctrls failed\n", 0, 0, 0 );
|
||||
goto return_results;
|
||||
}
|
||||
#endif
|
||||
|
||||
rc = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user