1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00

messaging3: Pass cache_dir to messaging_dgm_init()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2014-07-17 11:38:36 +00:00 committed by Jeremy Allison
parent 99e288c22b
commit f408a42896
3 changed files with 6 additions and 8 deletions

View File

@ -77,6 +77,7 @@ struct messaging_dgm_context;
int messaging_dgm_init(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct server_id pid,
const char *cache_dir,
void (*recv_cb)(int msg_type,
struct server_id src,
struct server_id dst,

View File

@ -248,6 +248,7 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx,
sec_init();
ret = messaging_dgm_init(ctx, ctx->event_ctx, ctx->id,
lp_cache_directory(),
messaging_recv_cb, ctx, &ctx->local);
if (ret != 0) {
@ -306,8 +307,9 @@ NTSTATUS messaging_reinit(struct messaging_context *msg_ctx)
msg_ctx->id = procid_self();
ret = messaging_dgm_init(msg_ctx, msg_ctx->event_ctx,
msg_ctx->id, messaging_recv_cb, msg_ctx,
ret = messaging_dgm_init(msg_ctx, msg_ctx->event_ctx, msg_ctx->id,
lp_cache_directory(),
messaging_recv_cb, msg_ctx,
&msg_ctx->local);
if (ret != 0) {
DEBUG(0, ("messaging_dgm_init failed: %s\n", strerror(errno)));

View File

@ -170,6 +170,7 @@ static int messaging_dgm_lockfile_remove(TALLOC_CTX *tmp_ctx,
int messaging_dgm_init(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct server_id pid,
const char *cache_dir,
void (*recv_cb)(int msg_type,
struct server_id src,
struct server_id dst,
@ -182,17 +183,11 @@ int messaging_dgm_init(TALLOC_CTX *mem_ctx,
struct messaging_dgm_context *ctx;
int ret;
bool ok;
const char *cache_dir;
char *socket_dir;
struct sockaddr_un socket_address;
size_t sockname_len;
uint64_t cookie;
cache_dir = lp_cache_directory();
if (cache_dir == NULL) {
return errno;
}
ctx = talloc_zero(mem_ctx, struct messaging_dgm_context);
if (ctx == NULL) {
goto fail_nomem;