svn commit: samba r15104 - branches/SAMBA_3_0/source/registry branches/SAMBA_3_0/source/tdb trunk/source/registry trunk/source/tdb

vlendec at samba.org vlendec at samba.org
Mon Apr 17 13:07:00 GMT 2006


Author: vlendec
Date: 2006-04-17 13:06:57 +0000 (Mon, 17 Apr 2006)
New Revision: 15104

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

Log:
Implement Samba4's tdb_name().

Volker


Modified:
   branches/SAMBA_3_0/source/registry/reg_perfcount.c
   branches/SAMBA_3_0/source/tdb/tdbutil.c
   trunk/source/registry/reg_perfcount.c
   trunk/source/tdb/tdbutil.c


Changeset:
Modified: branches/SAMBA_3_0/source/registry/reg_perfcount.c
===================================================================
--- branches/SAMBA_3_0/source/registry/reg_perfcount.c	2006-04-17 12:27:35 UTC (rev 15103)
+++ branches/SAMBA_3_0/source/registry/reg_perfcount.c	2006-04-17 13:06:57 UTC (rev 15104)
@@ -172,7 +172,7 @@
 		/* If a key isn't there, just bypass it -- this really shouldn't 
 		   happen unless someone's mucking around with the tdb */
 		DEBUG(3, ("_reg_perfcount_multi_sz_from_tdb: failed to find key [%s] in [%s].\n",
-			  temp, tdb->name));
+			  temp, tdb_name(tdb)));
 		return buffer_size;
 	}
 	/* First encode the name_index */

Modified: branches/SAMBA_3_0/source/tdb/tdbutil.c
===================================================================
--- branches/SAMBA_3_0/source/tdb/tdbutil.c	2006-04-17 12:27:35 UTC (rev 15103)
+++ branches/SAMBA_3_0/source/tdb/tdbutil.c	2006-04-17 13:06:57 UTC (rev 15104)
@@ -805,6 +805,14 @@
 	return tdb;
 }
 
+/****************************************************************************
+  return the name of the current tdb file useful for external logging
+  functions
+****************************************************************************/
+const char *tdb_name(struct tdb_context *tdb)
+{
+	return tdb->name;
+}
 
 /****************************************************************************
  Allow tdb_delete to be used as a tdb_traversal_fn.

Modified: trunk/source/registry/reg_perfcount.c
===================================================================
--- trunk/source/registry/reg_perfcount.c	2006-04-17 12:27:35 UTC (rev 15103)
+++ trunk/source/registry/reg_perfcount.c	2006-04-17 13:06:57 UTC (rev 15104)
@@ -172,7 +172,7 @@
 		/* If a key isn't there, just bypass it -- this really shouldn't 
 		   happen unless someone's mucking around with the tdb */
 		DEBUG(3, ("_reg_perfcount_multi_sz_from_tdb: failed to find key [%s] in [%s].\n",
-			  temp, tdb->name));
+			  temp, tdb_name(tdb)));
 		return buffer_size;
 	}
 	/* First encode the name_index */

Modified: trunk/source/tdb/tdbutil.c
===================================================================
--- trunk/source/tdb/tdbutil.c	2006-04-17 12:27:35 UTC (rev 15103)
+++ trunk/source/tdb/tdbutil.c	2006-04-17 13:06:57 UTC (rev 15104)
@@ -805,6 +805,14 @@
 	return tdb;
 }
 
+/****************************************************************************
+  return the name of the current tdb file useful for external logging
+  functions
+****************************************************************************/
+const char *tdb_name(struct tdb_context *tdb)
+{
+	return tdb->name;
+}
 
 /****************************************************************************
  Allow tdb_delete to be used as a tdb_traversal_fn.



More information about the samba-cvs mailing list