summaryrefslogtreecommitdiff
path: root/source4/ntvfs
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-05-03 10:40:33 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-05-03 07:37:07 +0200
commitcdd802af8319e0b0744d8e727cef75526269ece2 (patch)
treedeb3c73bc35357a7fe272d40ce1568274316f8cf /source4/ntvfs
parent7261a9b9f76d19e6a2179a48e903e2fee4ee64a1 (diff)
downloadsamba-cdd802af8319e0b0744d8e727cef75526269ece2.tar.gz
samba-cdd802af8319e0b0744d8e727cef75526269ece2.tar.bz2
samba-cdd802af8319e0b0744d8e727cef75526269ece2.zip
s4-messaging Rename messaging -> imessaging
This avoid symbol and structure conflicts between Samba3 and Samba4, and chooses a less generic name. Andrew Bartlett
Diffstat (limited to 'source4/ntvfs')
-rw-r--r--source4/ntvfs/common/brlock.c6
-rw-r--r--source4/ntvfs/common/brlock.h2
-rw-r--r--source4/ntvfs/common/brlock_tdb.c10
-rw-r--r--source4/ntvfs/common/notify.c18
-rw-r--r--source4/ntvfs/common/opendb.c2
-rw-r--r--source4/ntvfs/common/opendb_tdb.c12
-rw-r--r--source4/ntvfs/ntvfs.h4
-rw-r--r--source4/ntvfs/ntvfs_base.c2
-rw-r--r--source4/ntvfs/posix/pvfs_oplock.c10
-rw-r--r--source4/ntvfs/posix/pvfs_wait.c10
-rw-r--r--source4/ntvfs/sysdep/sys_lease.c2
-rw-r--r--source4/ntvfs/sysdep/sys_lease.h8
12 files changed, 43 insertions, 43 deletions
diff --git a/source4/ntvfs/common/brlock.c b/source4/ntvfs/common/brlock.c
index 94041d2014..efb70226e6 100644
--- a/source4/ntvfs/common/brlock.c
+++ b/source4/ntvfs/common/brlock.c
@@ -45,16 +45,16 @@ void brl_set_ops(const struct brlock_ops *new_ops)
/*
Open up the brlock database. Close it down using talloc_free(). We
- need the messaging_ctx to allow for pending lock notifications.
+ need the imessaging_ctx to allow for pending lock notifications.
*/
struct brl_context *brl_init(TALLOC_CTX *mem_ctx, struct server_id server,
struct loadparm_context *lp_ctx,
- struct messaging_context *messaging_ctx)
+ struct imessaging_context *imessaging_ctx)
{
if (ops == NULL) {
brl_tdb_init_ops();
}
- return ops->brl_init(mem_ctx, server, lp_ctx, messaging_ctx);
+ return ops->brl_init(mem_ctx, server, lp_ctx, imessaging_ctx);
}
struct brl_handle *brl_create_handle(TALLOC_CTX *mem_ctx, struct ntvfs_handle *ntvfs, DATA_BLOB *file_key)
diff --git a/source4/ntvfs/common/brlock.h b/source4/ntvfs/common/brlock.h
index e5e618d045..7ae3111cc4 100644
--- a/source4/ntvfs/common/brlock.h
+++ b/source4/ntvfs/common/brlock.h
@@ -24,7 +24,7 @@
struct brlock_ops {
struct brl_context *(*brl_init)(TALLOC_CTX *, struct server_id ,
struct loadparm_context *lp_ctx,
- struct messaging_context *);
+ struct imessaging_context *);
struct brl_handle *(*brl_create_handle)(TALLOC_CTX *, struct ntvfs_handle *, DATA_BLOB *);
NTSTATUS (*brl_lock)(struct brl_context *,
struct brl_handle *,
diff --git a/source4/ntvfs/common/brlock_tdb.c b/source4/ntvfs/common/brlock_tdb.c
index 35d4c27d0f..630b4072db 100644
--- a/source4/ntvfs/common/brlock_tdb.c
+++ b/source4/ntvfs/common/brlock_tdb.c
@@ -48,7 +48,7 @@
struct brl_context {
struct tdb_wrap *w;
struct server_id server;
- struct messaging_context *messaging_ctx;
+ struct imessaging_context *imessaging_ctx;
};
/*
@@ -89,12 +89,12 @@ static bool brl_invalid_lock_range(uint64_t start, uint64_t size)
/*
Open up the brlock.tdb database. Close it down using
- talloc_free(). We need the messaging_ctx to allow for
+ talloc_free(). We need the imessaging_ctx to allow for
pending lock notifications.
*/
static struct brl_context *brl_tdb_init(TALLOC_CTX *mem_ctx, struct server_id server,
struct loadparm_context *lp_ctx,
- struct messaging_context *messaging_ctx)
+ struct imessaging_context *imessaging_ctx)
{
struct brl_context *brl;
@@ -110,7 +110,7 @@ static struct brl_context *brl_tdb_init(TALLOC_CTX *mem_ctx, struct server_id se
}
brl->server = server;
- brl->messaging_ctx = messaging_ctx;
+ brl->imessaging_ctx = imessaging_ctx;
return brl;
}
@@ -419,7 +419,7 @@ static void brl_tdb_notify_unlock(struct brl_context *brl,
if (locks[i].lock_type == PENDING_WRITE_LOCK) {
last_notice = i;
}
- messaging_send_ptr(brl->messaging_ctx, locks[i].context.server,
+ imessaging_send_ptr(brl->imessaging_ctx, locks[i].context.server,
MSG_BRL_RETRY, locks[i].notify_ptr);
}
}
diff --git a/source4/ntvfs/common/notify.c b/source4/ntvfs/common/notify.c
index 0b5f91bfe1..d05f04707a 100644
--- a/source4/ntvfs/common/notify.c
+++ b/source4/ntvfs/common/notify.c
@@ -41,7 +41,7 @@
struct notify_context {
struct tdb_wrap *w;
struct server_id server;
- struct messaging_context *messaging_ctx;
+ struct imessaging_context *imessaging_ctx;
struct notify_list *list;
struct notify_array *array;
int seqnum;
@@ -63,7 +63,7 @@ struct notify_list {
#define NOTIFY_ENABLE_DEFAULT true
static NTSTATUS notify_remove_all(struct notify_context *notify);
-static void notify_handler(struct messaging_context *msg_ctx, void *private_data,
+static void notify_handler(struct imessaging_context *msg_ctx, void *private_data,
uint32_t msg_type, struct server_id server_id, DATA_BLOB *data);
/*
@@ -71,18 +71,18 @@ static void notify_handler(struct messaging_context *msg_ctx, void *private_data
*/
static int notify_destructor(struct notify_context *notify)
{
- messaging_deregister(notify->messaging_ctx, MSG_PVFS_NOTIFY, notify);
+ imessaging_deregister(notify->imessaging_ctx, MSG_PVFS_NOTIFY, notify);
notify_remove_all(notify);
return 0;
}
/*
Open up the notify.tdb database. You should close it down using
- talloc_free(). We need the messaging_ctx to allow for notifications
+ talloc_free(). We need the imessaging_ctx to allow for notifications
via internal messages
*/
struct notify_context *notify_init(TALLOC_CTX *mem_ctx, struct server_id server,
- struct messaging_context *messaging_ctx,
+ struct imessaging_context *imessaging_ctx,
struct loadparm_context *lp_ctx,
struct tevent_context *ev,
struct share_config *scfg)
@@ -109,7 +109,7 @@ struct notify_context *notify_init(TALLOC_CTX *mem_ctx, struct server_id server,
}
notify->server = server;
- notify->messaging_ctx = messaging_ctx;
+ notify->imessaging_ctx = imessaging_ctx;
notify->list = NULL;
notify->array = NULL;
notify->seqnum = tdb_get_seqnum(notify->w->tdb);
@@ -118,7 +118,7 @@ struct notify_context *notify_init(TALLOC_CTX *mem_ctx, struct server_id server,
/* register with the messaging subsystem for the notify
message type */
- messaging_register(notify->messaging_ctx, notify,
+ imessaging_register(notify->imessaging_ctx, notify,
MSG_PVFS_NOTIFY, notify_handler);
notify->sys_notify_ctx = sys_notify_context_create(scfg, notify, ev);
@@ -247,7 +247,7 @@ static NTSTATUS notify_save(struct notify_context *notify)
/*
handle incoming notify messages
*/
-static void notify_handler(struct messaging_context *msg_ctx, void *private_data,
+static void notify_handler(struct imessaging_context *msg_ctx, void *private_data,
uint32_t msg_type, struct server_id server_id, DATA_BLOB *data)
{
struct notify_context *notify = talloc_get_type(private_data, struct notify_context);
@@ -563,7 +563,7 @@ static void notify_send(struct notify_context *notify, struct notify_entry *e,
return;
}
- status = messaging_send(notify->messaging_ctx, e->server,
+ status = imessaging_send(notify->imessaging_ctx, e->server,
MSG_PVFS_NOTIFY, &data);
talloc_free(tmp_ctx);
}
diff --git a/source4/ntvfs/common/opendb.c b/source4/ntvfs/common/opendb.c
index 12fe7015a7..29081ef7d6 100644
--- a/source4/ntvfs/common/opendb.c
+++ b/source4/ntvfs/common/opendb.c
@@ -55,7 +55,7 @@ void odb_set_ops(const struct opendb_ops *new_ops)
/*
Open up the openfiles.tdb database. Close it down using
- talloc_free(). We need the messaging_ctx to allow for pending open
+ talloc_free(). We need the imessaging_ctx to allow for pending open
notifications.
*/
struct odb_context *odb_init(TALLOC_CTX *mem_ctx,
diff --git a/source4/ntvfs/common/opendb_tdb.c b/source4/ntvfs/common/opendb_tdb.c
index 881fd5b57a..536d17f9c0 100644
--- a/source4/ntvfs/common/opendb_tdb.c
+++ b/source4/ntvfs/common/opendb_tdb.c
@@ -74,13 +74,13 @@ struct odb_lock {
} can_open;
};
-static NTSTATUS odb_oplock_break_send(struct messaging_context *msg_ctx,
+static NTSTATUS odb_oplock_break_send(struct imessaging_context *msg_ctx,
struct opendb_entry *e,
uint8_t level);
/*
Open up the openfiles.tdb database. Close it down using
- talloc_free(). We need the messaging_ctx to allow for pending open
+ talloc_free(). We need the imessaging_ctx to allow for pending open
notifications.
*/
static struct odb_context *odb_tdb_init(TALLOC_CTX *mem_ctx,
@@ -294,7 +294,7 @@ static NTSTATUS odb_push_record(struct odb_lock *lck, struct opendb_file *file)
/*
send an oplock break to a client
*/
-static NTSTATUS odb_oplock_break_send(struct messaging_context *msg_ctx,
+static NTSTATUS odb_oplock_break_send(struct imessaging_context *msg_ctx,
struct opendb_entry *e,
uint8_t level)
{
@@ -311,7 +311,7 @@ static NTSTATUS odb_oplock_break_send(struct messaging_context *msg_ctx,
blob = data_blob_const(&op_break, sizeof(op_break));
- status = messaging_send(msg_ctx, e->server,
+ status = imessaging_send(msg_ctx, e->server,
MSG_NTVFS_OPLOCK_BREAK, &blob);
NT_STATUS_NOT_OK_RETURN(status);
@@ -611,7 +611,7 @@ static NTSTATUS odb_tdb_close_file(struct odb_lock *lck, void *file_handle,
/* send any pending notifications, removing them once sent */
for (i=0;i<lck->file.num_pending;i++) {
- messaging_send_ptr(odb->ntvfs_ctx->msg_ctx,
+ imessaging_send_ptr(odb->ntvfs_ctx->msg_ctx,
lck->file.pending[i].server,
MSG_PVFS_RETRY_OPEN,
lck->file.pending[i].notify_ptr);
@@ -666,7 +666,7 @@ static NTSTATUS odb_tdb_update_oplock(struct odb_lock *lck, void *file_handle,
/* send any pending notifications, removing them once sent */
for (i=0;i<lck->file.num_pending;i++) {
- messaging_send_ptr(odb->ntvfs_ctx->msg_ctx,
+ imessaging_send_ptr(odb->ntvfs_ctx->msg_ctx,
lck->file.pending[i].server,
MSG_PVFS_RETRY_OPEN,
lck->file.pending[i].notify_ptr);
diff --git a/source4/ntvfs/ntvfs.h b/source4/ntvfs/ntvfs.h
index 203b588e08..a31e302dfc 100644
--- a/source4/ntvfs/ntvfs.h
+++ b/source4/ntvfs/ntvfs.h
@@ -201,7 +201,7 @@ struct ntvfs_context {
struct server_id server_id;
struct loadparm_context *lp_ctx;
struct tevent_context *event_ctx;
- struct messaging_context *msg_ctx;
+ struct imessaging_context *msg_ctx;
struct {
void *private_data;
@@ -330,7 +330,7 @@ struct ntvfs_critical_sizes {
.sizeof_ntvfs_handle_data = sizeof(struct ntvfs_handle_data), \
}
-struct messaging_context;
+struct imessaging_context;
#include "librpc/gen_ndr/security.h"
#include "librpc/gen_ndr/s4_notify.h"
#include "ntvfs/ntvfs_proto.h"
diff --git a/source4/ntvfs/ntvfs_base.c b/source4/ntvfs/ntvfs_base.c
index 1b1a53361b..1a83d27843 100644
--- a/source4/ntvfs/ntvfs_base.c
+++ b/source4/ntvfs/ntvfs_base.c
@@ -153,7 +153,7 @@ bool ntvfs_interface_differs(const struct ntvfs_critical_sizes *const iface)
NTSTATUS ntvfs_init_connection(TALLOC_CTX *mem_ctx, struct share_config *scfg, enum ntvfs_type type,
enum protocol_types protocol,
uint64_t ntvfs_client_caps,
- struct tevent_context *ev, struct messaging_context *msg,
+ struct tevent_context *ev, struct imessaging_context *msg,
struct loadparm_context *lp_ctx,
struct server_id server_id, struct ntvfs_context **_ctx)
{
diff --git a/source4/ntvfs/posix/pvfs_oplock.c b/source4/ntvfs/posix/pvfs_oplock.c
index a10188f3eb..5b9f3a318c 100644
--- a/source4/ntvfs/posix/pvfs_oplock.c
+++ b/source4/ntvfs/posix/pvfs_oplock.c
@@ -32,7 +32,7 @@ struct pvfs_oplock {
uint32_t level;
struct timeval break_to_level_II;
struct timeval break_to_none;
- struct messaging_context *msg_ctx;
+ struct imessaging_context *msg_ctx;
};
static NTSTATUS pvfs_oplock_release_internal(struct pvfs_file_handle *h,
@@ -158,7 +158,7 @@ static void pvfs_oplock_break(struct pvfs_oplock *opl, uint8_t level)
}
}
-static void pvfs_oplock_break_dispatch(struct messaging_context *msg,
+static void pvfs_oplock_break_dispatch(struct imessaging_context *msg,
void *private_data, uint32_t msg_type,
struct server_id src, DATA_BLOB *data)
{
@@ -169,7 +169,7 @@ static void pvfs_oplock_break_dispatch(struct messaging_context *msg,
ZERO_STRUCT(opb);
/* we need to check that this one is for us. See
- messaging_send_ptr() for the other side of this.
+ imessaging_send_ptr() for the other side of this.
*/
if (data->length == sizeof(struct opendb_oplock_break)) {
struct opendb_oplock_break *p;
@@ -192,7 +192,7 @@ static void pvfs_oplock_break_dispatch(struct messaging_context *msg,
static int pvfs_oplock_destructor(struct pvfs_oplock *opl)
{
- messaging_deregister(opl->msg_ctx, MSG_NTVFS_OPLOCK_BREAK, opl);
+ imessaging_deregister(opl->msg_ctx, MSG_NTVFS_OPLOCK_BREAK, opl);
return 0;
}
@@ -228,7 +228,7 @@ NTSTATUS pvfs_setup_oplock(struct pvfs_file *f, uint32_t oplock_granted)
opl->level = level;
opl->msg_ctx = f->pvfs->ntvfs->ctx->msg_ctx;
- status = messaging_register(opl->msg_ctx,
+ status = imessaging_register(opl->msg_ctx,
opl,
MSG_NTVFS_OPLOCK_BREAK,
pvfs_oplock_break_dispatch);
diff --git a/source4/ntvfs/posix/pvfs_wait.c b/source4/ntvfs/posix/pvfs_wait.c
index 876ce52797..013de69889 100644
--- a/source4/ntvfs/posix/pvfs_wait.c
+++ b/source4/ntvfs/posix/pvfs_wait.c
@@ -33,7 +33,7 @@ struct pvfs_wait {
void (*handler)(void *, enum pvfs_wait_notice);
void *private_data;
int msg_type;
- struct messaging_context *msg_ctx;
+ struct imessaging_context *msg_ctx;
struct tevent_context *ev;
struct ntvfs_request *req;
enum pvfs_wait_notice reason;
@@ -56,7 +56,7 @@ NTSTATUS pvfs_async_setup(struct ntvfs_module_context *ntvfs,
/*
receive a completion message for a wait
*/
-static void pvfs_wait_dispatch(struct messaging_context *msg,
+static void pvfs_wait_dispatch(struct imessaging_context *msg,
void *private_data, uint32_t msg_type,
struct server_id src, DATA_BLOB *data)
{
@@ -66,7 +66,7 @@ static void pvfs_wait_dispatch(struct messaging_context *msg,
void *p = NULL;
/* we need to check that this one is for us. See
- messaging_send_ptr() for the other side of this.
+ imessaging_send_ptr() for the other side of this.
*/
if (data->length == sizeof(void *)) {
void **pp;
@@ -116,7 +116,7 @@ static void pvfs_wait_timeout(struct tevent_context *ev,
static int pvfs_wait_destructor(struct pvfs_wait *pwait)
{
if (pwait->msg_type != -1) {
- messaging_deregister(pwait->msg_ctx, pwait->msg_type, pwait);
+ imessaging_deregister(pwait->msg_ctx, pwait->msg_type, pwait);
}
DLIST_REMOVE(pwait->pvfs->wait_list, pwait);
return 0;
@@ -162,7 +162,7 @@ struct pvfs_wait *pvfs_wait_message(struct pvfs_state *pvfs,
/* register with the messaging subsystem for this message
type */
if (msg_type != -1) {
- messaging_register(pwait->msg_ctx,
+ imessaging_register(pwait->msg_ctx,
pwait,
msg_type,
pvfs_wait_dispatch);
diff --git a/source4/ntvfs/sysdep/sys_lease.c b/source4/ntvfs/sysdep/sys_lease.c
index 8b0b3a5110..7865f717a4 100644
--- a/source4/ntvfs/sysdep/sys_lease.c
+++ b/source4/ntvfs/sysdep/sys_lease.c
@@ -40,7 +40,7 @@ static uint32_t num_backends;
_PUBLIC_ struct sys_lease_context *sys_lease_context_create(struct share_config *scfg,
TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
- struct messaging_context *msg,
+ struct imessaging_context *msg,
sys_lease_send_break_fn break_send)
{
struct sys_lease_context *ctx;
diff --git a/source4/ntvfs/sysdep/sys_lease.h b/source4/ntvfs/sysdep/sys_lease.h
index 422797b0b8..57a5e0a35f 100644
--- a/source4/ntvfs/sysdep/sys_lease.h
+++ b/source4/ntvfs/sysdep/sys_lease.h
@@ -21,10 +21,10 @@
struct sys_lease_context;
struct opendb_entry;
-struct messaging_context;
+struct imessaging_context;
struct tevent_context;
-typedef NTSTATUS (*sys_lease_send_break_fn)(struct messaging_context *,
+typedef NTSTATUS (*sys_lease_send_break_fn)(struct imessaging_context *,
struct opendb_entry *,
uint8_t level);
@@ -41,7 +41,7 @@ struct sys_lease_ops {
struct sys_lease_context {
struct tevent_context *event_ctx;
- struct messaging_context *msg_ctx;
+ struct imessaging_context *msg_ctx;
sys_lease_send_break_fn break_send;
void *private_data; /* for use of backend */
const struct sys_lease_ops *ops;
@@ -53,7 +53,7 @@ NTSTATUS sys_lease_init(void);
struct sys_lease_context *sys_lease_context_create(struct share_config *scfg,
TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
- struct messaging_context *msg_ctx,
+ struct imessaging_context *msg_ctx,
sys_lease_send_break_fn break_send);
NTSTATUS sys_lease_setup(struct sys_lease_context *ctx,