svn commit: samba r11109 - in
branches/SAMBA_4_0/source/lib/ldb/common: .
tridge at samba.org
tridge at samba.org
Mon Oct 17 11:26:23 GMT 2005
Author: tridge
Date: 2005-10-17 11:26:23 +0000 (Mon, 17 Oct 2005)
New Revision: 11109
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11109
Log:
fixed the error code return from most ldb functions (the change to use
ldb_transaction_cancel() broke it)
Modified:
branches/SAMBA_4_0/source/lib/ldb/common/ldb.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb.c 2005-10-17 10:55:50 UTC (rev 11108)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb.c 2005-10-17 11:26:23 UTC (rev 11109)
@@ -168,8 +168,6 @@
return LDB_ERR_OPERATIONS_ERROR;
}
- ldb_reset_err_string(ldb);
-
return module->ops->del_transaction(module);
}
@@ -246,7 +244,10 @@
if (status != LDB_SUCCESS) return status;
status = module->ops->add_record(module, message);
- if (status != LDB_SUCCESS) return ldb_transaction_cancel(ldb);
+ if (status != LDB_SUCCESS) {
+ ldb_transaction_cancel(ldb);
+ return status;
+ }
return ldb_transaction_commit(ldb);
}
@@ -274,7 +275,10 @@
if (status != LDB_SUCCESS) return status;
status = module->ops->modify_record(module, message);
- if (status != LDB_SUCCESS) return ldb_transaction_cancel(ldb);
+ if (status != LDB_SUCCESS) {
+ ldb_transaction_cancel(ldb);
+ return status;
+ }
return ldb_transaction_commit(ldb);
}
@@ -299,7 +303,10 @@
if (status != LDB_SUCCESS) return status;
status = module->ops->delete_record(module, dn);
- if (status != LDB_SUCCESS) return ldb_transaction_cancel(ldb);
+ if (status != LDB_SUCCESS) {
+ ldb_transaction_cancel(ldb);
+ return status;
+ }
return ldb_transaction_commit(ldb);
}
@@ -323,7 +330,10 @@
if (status != LDB_SUCCESS) return status;
status = module->ops->rename_record(module, olddn, newdn);
- if (status != LDB_SUCCESS) return ldb_transaction_cancel(ldb);
+ if (status != LDB_SUCCESS) {
+ ldb_transaction_cancel(ldb);
+ return status;
+ }
return ldb_transaction_commit(ldb);
}
More information about the samba-cvs
mailing list