More use of SLAPI accessor macros

This commit is contained in:
Luke Howard 2005-07-22 05:33:47 +00:00
parent de10624dc3
commit 44bb946436
5 changed files with 13 additions and 14 deletions

View File

@ -2317,11 +2317,6 @@ typedef struct slap_op {
#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 */
time_t o_time; /* time op was initiated */
int o_tincr; /* counter for multiple ops with same o_time */

View File

@ -55,9 +55,12 @@ typedef struct _Audit_record Audit_record;
#define SLAPI_OVERLAY_NAME "slapi"
#define SLAPI_OPERATION_PBLOCK(_op) ((op)->o_pb)
#define SLAPI_CONNECTION_PBLOCK(_conn) ((conn)->c_pb);
#define SLAPI_BACKEND_PBLOCK(_be) ((be)->be_pb)
#define SLAPI_OPERATION_PBLOCK(_op) ((_op)->o_hdr->oh_pb)
#define SLAPI_CONNECTION_PBLOCK(_conn) ((_conn)->c_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_SORTEDSEARCH_OID LDAP_CONTROL_SORTREQUEST

View File

@ -65,7 +65,7 @@ static int get_extension_block(int objecttype, void *object, struct slapi_extens
*parent = NULL;
break;
case SLAPI_X_EXT_OPERATION:
*eblock = ((Operation *)object)->o_extensions;
*eblock = ((Operation *)object)->o_hdr->oh_extensions;
*parent = ((Operation *)object)->o_conn;
break;
default:
@ -247,7 +247,7 @@ int slapi_int_create_object_extensions(int objecttype, void *object)
parent = NULL;
break;
case SLAPI_X_EXT_OPERATION:
peblock = &(((Operation *)object)->o_extensions);
peblock = &(((Operation *)object)->o_hdr->oh_extensions);
parent = ((Operation *)object)->o_conn;
break;
default:
@ -300,7 +300,7 @@ int slapi_int_free_object_extensions(int objecttype, void *object)
parent = NULL;
break;
case SLAPI_X_EXT_OPERATION:
peblock = &(((Operation *)object)->o_extensions);
peblock = &(((Operation *)object)->o_hdr->oh_extensions);
parent = ((Operation *)object)->o_conn;
break;
default:

View File

@ -309,9 +309,10 @@ slapi_int_init_connection( Slapi_PBlock *pb,
op = (Operation *) slapi_ch_calloc( 1, OPERATION_BUFFER_SIZE );
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_pb = pb;
op->o_extensions = NULL;
conn->c_pending_ops.stqh_first = op;

View File

@ -657,7 +657,7 @@ slapi_op_func( Operation *op, SlapReply *rs )
* We check for op->o_extensions to verify that we are not
* 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;
}