mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
More use of SLAPI accessor macros
This commit is contained in:
parent
de10624dc3
commit
44bb946436
@ -2317,11 +2317,6 @@ typedef struct slap_op {
|
|||||||
|
|
||||||
#define o_log_prefix o_hdr->oh_log_prefix
|
#define o_log_prefix o_hdr->oh_log_prefix
|
||||||
|
|
||||||
#ifdef LDAP_SLAPI
|
|
||||||
#define o_pb o_hdr->oh_pb
|
|
||||||
#define o_extensions o_hdr->oh_extensions
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ber_tag_t o_tag; /* tag of the request */
|
ber_tag_t o_tag; /* tag of the request */
|
||||||
time_t o_time; /* time op was initiated */
|
time_t o_time; /* time op was initiated */
|
||||||
int o_tincr; /* counter for multiple ops with same o_time */
|
int o_tincr; /* counter for multiple ops with same o_time */
|
||||||
|
@ -55,9 +55,12 @@ typedef struct _Audit_record Audit_record;
|
|||||||
|
|
||||||
#define SLAPI_OVERLAY_NAME "slapi"
|
#define SLAPI_OVERLAY_NAME "slapi"
|
||||||
|
|
||||||
#define SLAPI_OPERATION_PBLOCK(_op) ((op)->o_pb)
|
#define SLAPI_OPERATION_PBLOCK(_op) ((_op)->o_hdr->oh_pb)
|
||||||
#define SLAPI_CONNECTION_PBLOCK(_conn) ((conn)->c_pb);
|
#define SLAPI_CONNECTION_PBLOCK(_conn) ((_conn)->c_pb);
|
||||||
#define SLAPI_BACKEND_PBLOCK(_be) ((be)->be_pb)
|
#define SLAPI_BACKEND_PBLOCK(_be) ((_be)->be_pb)
|
||||||
|
|
||||||
|
#define SLAPI_OPERATION_EXTENSIONS(_op) ((_op)->o_hdr->oh_extensions)
|
||||||
|
#define SLAPI_CONNECTION_EXTENSIONS(_conn) ((_conn)->c_extensions)
|
||||||
|
|
||||||
#define SLAPI_CONTROL_MANAGEDSAIT_OID LDAP_CONTROL_MANAGEDSAIT
|
#define SLAPI_CONTROL_MANAGEDSAIT_OID LDAP_CONTROL_MANAGEDSAIT
|
||||||
#define SLAPI_CONTROL_SORTEDSEARCH_OID LDAP_CONTROL_SORTREQUEST
|
#define SLAPI_CONTROL_SORTEDSEARCH_OID LDAP_CONTROL_SORTREQUEST
|
||||||
|
@ -65,7 +65,7 @@ static int get_extension_block(int objecttype, void *object, struct slapi_extens
|
|||||||
*parent = NULL;
|
*parent = NULL;
|
||||||
break;
|
break;
|
||||||
case SLAPI_X_EXT_OPERATION:
|
case SLAPI_X_EXT_OPERATION:
|
||||||
*eblock = ((Operation *)object)->o_extensions;
|
*eblock = ((Operation *)object)->o_hdr->oh_extensions;
|
||||||
*parent = ((Operation *)object)->o_conn;
|
*parent = ((Operation *)object)->o_conn;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -247,7 +247,7 @@ int slapi_int_create_object_extensions(int objecttype, void *object)
|
|||||||
parent = NULL;
|
parent = NULL;
|
||||||
break;
|
break;
|
||||||
case SLAPI_X_EXT_OPERATION:
|
case SLAPI_X_EXT_OPERATION:
|
||||||
peblock = &(((Operation *)object)->o_extensions);
|
peblock = &(((Operation *)object)->o_hdr->oh_extensions);
|
||||||
parent = ((Operation *)object)->o_conn;
|
parent = ((Operation *)object)->o_conn;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -300,7 +300,7 @@ int slapi_int_free_object_extensions(int objecttype, void *object)
|
|||||||
parent = NULL;
|
parent = NULL;
|
||||||
break;
|
break;
|
||||||
case SLAPI_X_EXT_OPERATION:
|
case SLAPI_X_EXT_OPERATION:
|
||||||
peblock = &(((Operation *)object)->o_extensions);
|
peblock = &(((Operation *)object)->o_hdr->oh_extensions);
|
||||||
parent = ((Operation *)object)->o_conn;
|
parent = ((Operation *)object)->o_conn;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -309,9 +309,10 @@ slapi_int_init_connection( Slapi_PBlock *pb,
|
|||||||
|
|
||||||
op = (Operation *) slapi_ch_calloc( 1, OPERATION_BUFFER_SIZE );
|
op = (Operation *) slapi_ch_calloc( 1, OPERATION_BUFFER_SIZE );
|
||||||
op->o_hdr = (Opheader *)(op + 1);
|
op->o_hdr = (Opheader *)(op + 1);
|
||||||
|
op->o_hdr->oh_pb = pb;
|
||||||
|
op->o_hdr->oh_extensions = NULL;
|
||||||
|
|
||||||
op->o_controls = (void **)(op->o_hdr + 1);
|
op->o_controls = (void **)(op->o_hdr + 1);
|
||||||
op->o_pb = pb;
|
|
||||||
op->o_extensions = NULL;
|
|
||||||
|
|
||||||
conn->c_pending_ops.stqh_first = op;
|
conn->c_pending_ops.stqh_first = op;
|
||||||
|
|
||||||
|
@ -657,7 +657,7 @@ slapi_op_func( Operation *op, SlapReply *rs )
|
|||||||
* We check for op->o_extensions to verify that we are not
|
* We check for op->o_extensions to verify that we are not
|
||||||
* processing a SLAPI internal operation. XXX
|
* processing a SLAPI internal operation. XXX
|
||||||
*/
|
*/
|
||||||
if ( pb == NULL || op->o_extensions == NULL ) {
|
if ( pb == NULL || op->o_hdr->oh_extensions == NULL ) {
|
||||||
return SLAP_CB_CONTINUE;
|
return SLAP_CB_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user