mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
r16007: If no error string was setup by the backend, ensure that we always get
at least a generic error, even when inside a transaction. This helps debugging ldb/js interactions a lot... Andrew Bartlett
This commit is contained in:
parent
d4af8da7c9
commit
b607acf6f0
@ -265,7 +265,8 @@ static int ldb_op_finish(struct ldb_context *ldb, int status)
|
||||
if (ldb->err_string == NULL) {
|
||||
/* no error string was setup by the backend */
|
||||
ldb_set_errstring(ldb,
|
||||
talloc_asprintf(ldb, "ldb error %d", status));
|
||||
talloc_asprintf(ldb, "%s (%d)",
|
||||
ldb_strerror(status), status));
|
||||
}
|
||||
ldb_transaction_cancel(ldb);
|
||||
return status;
|
||||
@ -463,6 +464,13 @@ static int ldb_autotransaction_request(struct ldb_context *ldb, struct ldb_reque
|
||||
return ldb_op_finish(ldb, ret);
|
||||
}
|
||||
|
||||
if (ldb->err_string == NULL) {
|
||||
/* no error string was setup by the backend */
|
||||
ldb_set_errstring(ldb,
|
||||
talloc_asprintf(ldb, "%s (%d)",
|
||||
ldb_strerror(ret), ret));
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user