r15104: Implement Samba4's tdb_name().
authorVolker Lendecke <vlendec@samba.org>
Mon, 17 Apr 2006 13:06:57 +0000 (13:06 +0000)
committerVolker Lendecke <vlendec@samba.org>
Mon, 17 Apr 2006 13:06:57 +0000 (13:06 +0000)
Volker

source/registry/reg_perfcount.c
source/tdb/tdbutil.c

index 7f9e9ad66269b350a726eeaf1b752732d6f54b03..385128e7b55800b28ef23bbb6c3a9e89b97fa7f5 100644 (file)
@@ -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 */
index f1809229f8c2707472f13528bd9e3476b4b2c9cd..fc45fa936060c61d7ad48b647be90be5ee57283a 100644 (file)
@@ -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.