/* saves the current controls list into the "saver" and replace the one in req with a new one excluding
the "exclude" control */
/* returns 0 on error */
-int save_controls(struct ldb_control *exclude, struct ldb_request *req, struct ldb_control ***saver)
+int ldb_save_controls(struct ldb_control *exclude, struct ldb_request *req, struct ldb_control ***saver)
{
struct ldb_control **lcs;
unsigned int i, j;
/* check if there's any control marked as critical in the list */
/* return True if any, False if none */
-int check_critical_controls(struct ldb_control **controls)
+int ldb_check_critical_controls(struct ldb_control **controls)
{
unsigned int i;
const struct ldb_val *v2);
/* The following definitions come from lib/ldb/common/ldb_controls.c */
-struct ldb_control *get_control_from_list(struct ldb_control **controls, const char *oid);
-int save_controls(struct ldb_control *exclude, struct ldb_request *req, struct ldb_control ***saver);
+int ldb_save_controls(struct ldb_control *exclude, struct ldb_request *req, struct ldb_control ***saver);
/* Returns a list of controls, except the one specified. Included
* controls become a child of returned list if they were children of
* controls_in */
struct ldb_control **controls_except_specified(struct ldb_control **controls_in,
TALLOC_CTX *mem_ctx,
struct ldb_control *exclude);
-int check_critical_controls(struct ldb_control **controls);
+int ldb_check_critical_controls(struct ldb_control **controls);
/* The following definitions come from lib/ldb/common/ldb_ldif.c */
int ldb_should_b64_encode(struct ldb_context *ldb, const struct ldb_val *val);
struct tevent_timer *te;
struct timeval tv;
- if (check_critical_controls(req->controls)) {
+ if (ldb_check_critical_controls(req->controls)) {
return LDB_ERR_UNSUPPORTED_CRITICAL_EXTENSION;
}
/* remove the ASQ control itself */
control = ldb_request_get_control(ac->req, LDB_CONTROL_ASQ_OID);
- if (!save_controls(control, ac->reqs[i], &saved_controls)) {
+ if (!ldb_save_controls(control, ac->reqs[i], &saved_controls)) {
return LDB_ERR_OPERATIONS_ERROR;
}
}
/* save it locally and remove it from the list */
/* we do not need to replace them later as we
* are keeping the original req intact */
- if (!save_controls(control, search_req, &saved_controls)) {
+ if (!ldb_save_controls(control, search_req, &saved_controls)) {
return LDB_ERR_OPERATIONS_ERROR;
}
/* save it locally and remove it from the list */
/* we do not need to replace them later as we
* are keeping the original req intact */
- if (!save_controls(control, down_req, &saved_controls)) {
+ if (!ldb_save_controls(control, down_req, &saved_controls)) {
return LDB_ERR_OPERATIONS_ERROR;
}