return LDB_SUCCESS;
}
-void ldb_set_errstring(struct ldb_module *module, char *err_string)
+void ldb_set_errstring(struct ldb_context *ldb, char *err_string)
{
- if (module->ldb->err_string) {
- talloc_free(module->ldb->err_string);
+ if (ldb->err_string) {
+ talloc_free(ldb->err_string);
}
- module->ldb->err_string = talloc_steal(module->ldb, err_string);
+ ldb->err_string = talloc_steal(ldb, err_string);
}
void ldb_reset_err_string(struct ldb_context *ldb)
if (status != LDB_SUCCESS) {
if (ldb->err_string == NULL) {
/* no error string was setup by the backend */
- ldb_set_errstring(ldb->modules,
+ ldb_set_errstring(ldb,
talloc_asprintf(ldb, "ldb transaction start error %d", status));
}
}
if (status != LDB_SUCCESS) {
if (ldb->err_string == NULL) {
/* no error string was setup by the backend */
- ldb_set_errstring(ldb->modules,
+ ldb_set_errstring(ldb,
talloc_asprintf(ldb, "ldb transaction commit error %d", status));
}
}
if (status != LDB_SUCCESS) {
if (ldb->err_string == NULL) {
/* no error string was setup by the backend */
- ldb_set_errstring(ldb->modules,
+ ldb_set_errstring(ldb,
talloc_asprintf(ldb, "ldb transaction cancel error %d", status));
}
}
}
if (ldb->err_string == NULL) {
/* no error string was setup by the backend */
- ldb_set_errstring(ldb->modules,
+ ldb_set_errstring(ldb,
talloc_asprintf(ldb, "ldb error %d", status));
}
ldb_transaction_cancel(ldb);
tree = ldb_parse_tree(ldb, expression);
if (tree == NULL) {
- ldb_set_errstring(ldb->modules, talloc_strdup(ldb, "Unable to parse search expression"));
+ ldb_set_errstring(ldb, talloc_strdup(ldb, "Unable to parse search expression"));
return -1;
}