summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-04-17 13:06:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:16:23 -0500
commit30832e95dc47acf70ab9f18e80d7a28e73e212c8 (patch)
tree28cd09e942f9279c48360c32a13a193ee4c604ff /source3
parent76e581b983989377d3ac3ae89b2b7d925aadc3f5 (diff)
downloadsamba-30832e95dc47acf70ab9f18e80d7a28e73e212c8.tar.gz
samba-30832e95dc47acf70ab9f18e80d7a28e73e212c8.tar.bz2
samba-30832e95dc47acf70ab9f18e80d7a28e73e212c8.zip
r15104: Implement Samba4's tdb_name().
Volker (This used to be commit d52002c1c9d28e637ca4d1553e800b0b97790f36)
Diffstat (limited to 'source3')
-rw-r--r--source3/registry/reg_perfcount.c2
-rw-r--r--source3/tdb/tdbutil.c8
2 files changed, 9 insertions, 1 deletions
diff --git a/source3/registry/reg_perfcount.c b/source3/registry/reg_perfcount.c
index 7f9e9ad662..385128e7b5 100644
--- a/source3/registry/reg_perfcount.c
+++ b/source3/registry/reg_perfcount.c
@@ -172,7 +172,7 @@ static uint32 _reg_perfcount_multi_sz_from_tdb(TDB_CONTEXT *tdb,
/* 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 */
diff --git a/source3/tdb/tdbutil.c b/source3/tdb/tdbutil.c
index f1809229f8..fc45fa9360 100644
--- a/source3/tdb/tdbutil.c
+++ b/source3/tdb/tdbutil.c
@@ -805,6 +805,14 @@ TDB_CONTEXT *tdb_open_log(const char *name, int hash_size, int tdb_flags,
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.