summaryrefslogtreecommitdiff
path: root/source3/lib/dbwrap
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-05-11 21:36:48 +0200
committerMichael Adam <obnox@samba.org>2012-05-13 22:41:48 +0200
commit508a33fc2af8f2c1bcfe9aad5362cf3a9762c585 (patch)
tree6c0669ec82000a6f9d212b04ac3d73b83253df40 /source3/lib/dbwrap
parent3583922c8277bf0ab9003953cb0a6ba27b7e7988 (diff)
downloadsamba-508a33fc2af8f2c1bcfe9aad5362cf3a9762c585.tar.gz
samba-508a33fc2af8f2c1bcfe9aad5362cf3a9762c585.tar.bz2
samba-508a33fc2af8f2c1bcfe9aad5362cf3a9762c585.zip
s3:dbwrap: move definition of dbwrap_lock_order to dbwrap.h
This is needed in all of the library, not only in the dbwrap_open part.
Diffstat (limited to 'source3/lib/dbwrap')
-rw-r--r--source3/lib/dbwrap/dbwrap.h6
-rw-r--r--source3/lib/dbwrap/dbwrap_ctdb.c1
-rw-r--r--source3/lib/dbwrap/dbwrap_open.h6
-rw-r--r--source3/lib/dbwrap/dbwrap_private.h2
4 files changed, 7 insertions, 8 deletions
diff --git a/source3/lib/dbwrap/dbwrap.h b/source3/lib/dbwrap/dbwrap.h
index 3304bcf4a4..59e5af069e 100644
--- a/source3/lib/dbwrap/dbwrap.h
+++ b/source3/lib/dbwrap/dbwrap.h
@@ -25,6 +25,12 @@
struct db_record;
struct db_context;
+enum dbwrap_lock_order {
+ DBWRAP_LOCK_ORDER_1 = 1,
+ DBWRAP_LOCK_ORDER_2 = 2,
+ DBWRAP_LOCK_ORDER_3 = 3
+};
+
/* The following definitions come from lib/dbwrap.c */
TDB_DATA dbwrap_record_get_key(const struct db_record *rec);
diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c
index 933cad5ebd..1e9975417d 100644
--- a/source3/lib/dbwrap/dbwrap_ctdb.c
+++ b/source3/lib/dbwrap/dbwrap_ctdb.c
@@ -22,6 +22,7 @@
#include "system/filesys.h"
#include "lib/tdb_wrap/tdb_wrap.h"
#include "util_tdb.h"
+#include "dbwrap/dbwrap.h"
#include "dbwrap/dbwrap_ctdb.h"
#include "dbwrap/dbwrap_rbt.h"
#include "lib/param/param.h"
diff --git a/source3/lib/dbwrap/dbwrap_open.h b/source3/lib/dbwrap/dbwrap_open.h
index 9ed2245afd..51c7dfd235 100644
--- a/source3/lib/dbwrap/dbwrap_open.h
+++ b/source3/lib/dbwrap/dbwrap_open.h
@@ -29,12 +29,6 @@ struct db_context;
*/
bool db_is_local(const char *name);
-enum dbwrap_lock_order {
- DBWRAP_LOCK_ORDER_1 = 1,
- DBWRAP_LOCK_ORDER_2 = 2,
- DBWRAP_LOCK_ORDER_3 = 3
-};
-
/**
* Convenience function that will determine whether to
* open a tdb database via the tdb backend or via the ctdb
diff --git a/source3/lib/dbwrap/dbwrap_private.h b/source3/lib/dbwrap/dbwrap_private.h
index 94993428a4..c197ffacf2 100644
--- a/source3/lib/dbwrap/dbwrap_private.h
+++ b/source3/lib/dbwrap/dbwrap_private.h
@@ -23,8 +23,6 @@
#ifndef __DBWRAP_PRIVATE_H__
#define __DBWRAP_PRIVATE_H__
-#include "dbwrap/dbwrap_open.h"
-
struct db_record {
struct db_context *db;
TDB_DATA key, value;