s3:dbwrap: move definition of dbwrap_lock_order to dbwrap.h
authorMichael Adam <obnox@samba.org>
Fri, 11 May 2012 19:36:48 +0000 (21:36 +0200)
committerMichael Adam <obnox@samba.org>
Sun, 13 May 2012 20:41:48 +0000 (22:41 +0200)
This is needed in all of the library, not only in the dbwrap_open part.

source3/lib/dbwrap/dbwrap.h
source3/lib/dbwrap/dbwrap_ctdb.c
source3/lib/dbwrap/dbwrap_open.h
source3/lib/dbwrap/dbwrap_private.h

index 3304bcf4a466d69053ff2c04094708eebfc65ffd..59e5af069ea4e4aa03cc7515eee406b13cc5af68 100644 (file)
 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);
index 933cad5ebdf37a631954c8d493bcfde48ea2ee7e..1e9975417d9f677677041ee2e200341337ce9a0c 100644 (file)
@@ -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"
index 9ed2245afd6386f8ac117d0786dd3f9cf161a5ba..51c7dfd23535054db2e20610c2d2da153ed5be88 100644 (file)
@@ -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
index 94993428a4f41f6e0a0f44c1c78688a9493c2772..c197ffacf2df739990055512b3bb21f16f43eed3 100644 (file)
@@ -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;