summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-04-14 14:56:35 +0200
committerVolker Lendecke <vl@samba.org>2009-04-16 15:07:06 +0200
commitea3a022ca3ed97f0ac3f16536832e8ec43683f8c (patch)
treea0a3b6570026751b76c65a0eb17f3ea6effa6251 /source3
parent448b434a862da0ca621c3b695dc800e9ec5e8fcf (diff)
downloadsamba-ea3a022ca3ed97f0ac3f16536832e8ec43683f8c.tar.gz
samba-ea3a022ca3ed97f0ac3f16536832e8ec43683f8c.tar.bz2
samba-ea3a022ca3ed97f0ac3f16536832e8ec43683f8c.zip
Rename notify_context->db to db_recursive
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/notify_internal.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/source3/smbd/notify_internal.c b/source3/smbd/notify_internal.c
index 1e45c54cbb..1b66865cb6 100644
--- a/source3/smbd/notify_internal.c
+++ b/source3/smbd/notify_internal.c
@@ -27,7 +27,7 @@
#include "librpc/gen_ndr/ndr_notify.h"
struct notify_context {
- struct db_context *db;
+ struct db_context *db_recursive;
struct server_id server;
struct messaging_context *messaging_ctx;
struct notify_list *list;
@@ -91,10 +91,10 @@ struct notify_context *notify_init(TALLOC_CTX *mem_ctx, struct server_id server,
return NULL;
}
- notify->db = db_open(notify, lock_path("notify.tdb"),
- 0, TDB_SEQNUM|TDB_CLEAR_IF_FIRST,
- O_RDWR|O_CREAT, 0644);
- if (notify->db == NULL) {
+ notify->db_recursive = db_open(notify, lock_path("notify.tdb"),
+ 0, TDB_SEQNUM|TDB_CLEAR_IF_FIRST,
+ O_RDWR|O_CREAT, 0644);
+ if (notify->db_recursive == NULL) {
talloc_free(notify);
return NULL;
}
@@ -103,7 +103,8 @@ struct notify_context *notify_init(TALLOC_CTX *mem_ctx, struct server_id server,
notify->messaging_ctx = messaging_ctx;
notify->list = NULL;
notify->array = NULL;
- notify->seqnum = notify->db->get_seqnum(notify->db);
+ notify->seqnum = notify->db_recursive->get_seqnum(
+ notify->db_recursive);
notify->key = string_term_tdb_data(NOTIFY_KEY);
talloc_set_destructor(notify, notify_destructor);
@@ -123,7 +124,8 @@ struct notify_context *notify_init(TALLOC_CTX *mem_ctx, struct server_id server,
*/
static NTSTATUS notify_fetch_locked(struct notify_context *notify, struct db_record **rec)
{
- *rec = notify->db->fetch_locked(notify->db, notify, notify->key);
+ *rec = notify->db_recursive->fetch_locked(notify->db_recursive,
+ notify, notify->key);
if (*rec == NULL) {
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
@@ -140,7 +142,7 @@ static NTSTATUS notify_load(struct notify_context *notify, struct db_record *rec
NTSTATUS status;
int seqnum;
- seqnum = notify->db->get_seqnum(notify->db);
+ seqnum = notify->db_recursive->get_seqnum(notify->db_recursive);
if (seqnum == notify->seqnum && notify->array != NULL) {
return NT_STATUS_OK;
@@ -153,7 +155,8 @@ static NTSTATUS notify_load(struct notify_context *notify, struct db_record *rec
NT_STATUS_HAVE_NO_MEMORY(notify->array);
if (!rec) {
- if (notify->db->fetch(notify->db, notify, notify->key, &dbuf) != 0) {
+ if (notify->db_recursive->fetch(notify->db_recursive, notify,
+ notify->key, &dbuf) != 0) {
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
} else {