]> git.sur5r.net Git - openldap/commitdiff
added slapi_backend_set_pb
authorLuke Howard <lukeh@openldap.org>
Sun, 19 Jan 2003 14:55:10 +0000 (14:55 +0000)
committerLuke Howard <lukeh@openldap.org>
Sun, 19 Jan 2003 14:55:10 +0000 (14:55 +0000)
servers/slapd/slapi/slapi_utils.c
servers/slapd/slapi/slapi_utils.h

index b137dd001375285c2781fc57a45b0e90cc838ea4..24d5e5a737b2cd7322bc84852c010625d75d562c 100644 (file)
@@ -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.
  */
index 184dd9e3ac1dc2f93f7ef8466dd135f228b1298a..5f03a9b5b83533258252256845edebe8ae25f201 100644 (file)
@@ -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 );