From: Luke Howard Date: Sun, 19 Jan 2003 14:55:10 +0000 (+0000) Subject: added slapi_backend_set_pb X-Git-Tag: NO_SLAP_OP_BLOCKS~603 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=cb61800ac628344d2e7dddec28524ca536c94b58;p=openldap added slapi_backend_set_pb --- diff --git a/servers/slapd/slapi/slapi_utils.c b/servers/slapd/slapi/slapi_utils.c index b137dd0013..24d5e5a737 100644 --- a/servers/slapd/slapi/slapi_utils.c +++ b/servers/slapd/slapi/slapi_utils.c @@ -1130,6 +1130,17 @@ slapi_free_search_results_internal( Slapi_PBlock *pb ) #endif /* defined(LDAP_SLAPI) */ } +/* + * Internal API to prime a Slapi_PBlock with a Backend. + */ +void slapi_backend_set_pb( Slapi_PBlock *pb, Backend *be ) +{ +#if defined(LDAP_SLAPI) + slapi_pblock_set(pb, SLAPI_BACKEND, (void *)be); + slapi_pblock_set(pb, SLAPI_BE_TYPE, (void *)be->bd_info->bi_type); +#endif /* defined(LDAP_SLAPI) */ +} + /* * Internal API to prime a Slapi_PBlock with a Connection. */ diff --git a/servers/slapd/slapi/slapi_utils.h b/servers/slapd/slapi/slapi_utils.h index 184dd9e3ac..5f03a9b5b8 100644 --- a/servers/slapd/slapi/slapi_utils.h +++ b/servers/slapd/slapi/slapi_utils.h @@ -108,6 +108,7 @@ int slapi_audit_init_header( Connection *conn, Operation *op, int slapi_audit_send_record( Slapi_PBlock *pb, Connection *conn, Operation *op, int rc); +void slapi_backend_set_pb( Slapi_PBlock *pb, Backend *be ); void slapi_connection_set_pb( Slapi_PBlock *pb, Connection *conn ); void slapi_operation_set_pb( Slapi_PBlock *pb, Operation *op );