svn commit: samba r23957 - in branches: SAMBA_3_2/source/lib SAMBA_3_2_0/source/lib

obnox at samba.org obnox at samba.org
Wed Jul 18 14:38:21 GMT 2007


Author: obnox
Date: 2007-07-18 14:38:18 +0000 (Wed, 18 Jul 2007)
New Revision: 23957

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23957

Log:
Use tdb_open_log instead of tdb_open.

Michael


Modified:
   branches/SAMBA_3_2/source/lib/util_tdb.c
   branches/SAMBA_3_2_0/source/lib/util_tdb.c


Changeset:
Modified: branches/SAMBA_3_2/source/lib/util_tdb.c
===================================================================
--- branches/SAMBA_3_2/source/lib/util_tdb.c	2007-07-18 14:03:46 UTC (rev 23956)
+++ branches/SAMBA_3_2/source/lib/util_tdb.c	2007-07-18 14:38:18 UTC (rev 23957)
@@ -1191,7 +1191,7 @@
 	}
 
 	/* open old tdb RDWR - so we can lock it */
-	src_tdb = tdb_open(src_path, 0, TDB_DEFAULT, O_RDWR, 0);
+	src_tdb = tdb_open_log(src_path, 0, TDB_DEFAULT, O_RDWR, 0);
 	if (src_tdb == NULL) {
 		DEBUG(3, ("Failed to open tdb '%s'\n", src_path));
 		goto done;
@@ -1204,10 +1204,10 @@
 
 	tmp_path = talloc_asprintf(ctx, "%s%s", dst_path, ".tmp");
 	unlink(tmp_path);
-	dst_tdb = tdb_open(tmp_path,
-			   hash_size ? hash_size : tdb_hash_size(src_tdb),
-			   TDB_DEFAULT, O_RDWR | O_CREAT | O_EXCL,
-			   st.st_mode & 0777);
+	dst_tdb = tdb_open_log(tmp_path,
+			       hash_size ? hash_size : tdb_hash_size(src_tdb),
+			       TDB_DEFAULT, O_RDWR | O_CREAT | O_EXCL,
+			       st.st_mode & 0777);
 	if (dst_tdb == NULL) {
 		DEBUG(3, ("Error creating tdb '%s': %s\n", tmp_path,
 			  strerror(errno)));
@@ -1224,7 +1224,7 @@
 
 	/* reopen ro and do basic verification */
 	tdb_close(dst_tdb);
-	dst_tdb = tdb_open(tmp_path, 0, TDB_DEFAULT, O_RDONLY, 0);
+	dst_tdb = tdb_open_log(tmp_path, 0, TDB_DEFAULT, O_RDONLY, 0);
 	if (!dst_tdb) {
 		DEBUG(3, ("Failed to reopen tdb '%s': %s\n", tmp_path,
 			  strerror(errno)));

Modified: branches/SAMBA_3_2_0/source/lib/util_tdb.c
===================================================================
--- branches/SAMBA_3_2_0/source/lib/util_tdb.c	2007-07-18 14:03:46 UTC (rev 23956)
+++ branches/SAMBA_3_2_0/source/lib/util_tdb.c	2007-07-18 14:38:18 UTC (rev 23957)
@@ -1191,7 +1191,7 @@
 	}
 
 	/* open old tdb RDWR - so we can lock it */
-	src_tdb = tdb_open(src_path, 0, TDB_DEFAULT, O_RDWR, 0);
+	src_tdb = tdb_open_log(src_path, 0, TDB_DEFAULT, O_RDWR, 0);
 	if (src_tdb == NULL) {
 		DEBUG(3, ("Failed to open tdb '%s'\n", src_path));
 		goto done;
@@ -1204,10 +1204,10 @@
 
 	tmp_path = talloc_asprintf(ctx, "%s%s", dst_path, ".tmp");
 	unlink(tmp_path);
-	dst_tdb = tdb_open(tmp_path,
-			   hash_size ? hash_size : tdb_hash_size(src_tdb),
-			   TDB_DEFAULT, O_RDWR | O_CREAT | O_EXCL,
-			   st.st_mode & 0777);
+	dst_tdb = tdb_open_log(tmp_path,
+			       hash_size ? hash_size : tdb_hash_size(src_tdb),
+			       TDB_DEFAULT, O_RDWR | O_CREAT | O_EXCL,
+			       st.st_mode & 0777);
 	if (dst_tdb == NULL) {
 		DEBUG(3, ("Error creating tdb '%s': %s\n", tmp_path,
 			  strerror(errno)));
@@ -1224,7 +1224,7 @@
 
 	/* reopen ro and do basic verification */
 	tdb_close(dst_tdb);
-	dst_tdb = tdb_open(tmp_path, 0, TDB_DEFAULT, O_RDONLY, 0);
+	dst_tdb = tdb_open_log(tmp_path, 0, TDB_DEFAULT, O_RDONLY, 0);
 	if (!dst_tdb) {
 		DEBUG(3, ("Failed to reopen tdb '%s': %s\n", tmp_path,
 			  strerror(errno)));



More information about the samba-cvs mailing list