summaryrefslogtreecommitdiffstats
path: root/source3/lib/messages.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-06-10 15:21:10 +0000
committerJeremy Allison <jra@samba.org>2014-06-18 21:17:57 +0200
commit364bdadde3159dde1ddcc8c5fa4be981448f6833 (patch)
tree8bb9c037a700b45aa70428819f2a2ce881ab0731 /source3/lib/messages.c
parentb84ea45fbd54fde820438d2065eedfb757b7158d (diff)
downloadsamba-364bdadde3159dde1ddcc8c5fa4be981448f6833.tar.gz
samba-364bdadde3159dde1ddcc8c5fa4be981448f6833.tar.xz
samba-364bdadde3159dde1ddcc8c5fa4be981448f6833.zip
messaging3: Make messaging_dgm_init return 0/errno
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jun 18 21:17:57 CEST 2014 on sn-devel-104
Diffstat (limited to 'source3/lib/messages.c')
-rw-r--r--source3/lib/messages.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source3/lib/messages.c b/source3/lib/messages.c
index 53fff214da..9514392c03 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -209,6 +209,7 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx,
{
struct messaging_context *ctx;
NTSTATUS status;
+ int ret;
static bool have_context = false;
if (have_context) {
@@ -225,11 +226,10 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx,
ctx->event_ctx = ev;
ctx->have_context = &have_context;
- status = messaging_dgm_init(ctx, ctx, &ctx->local);
+ ret = messaging_dgm_init(ctx, ctx, &ctx->local);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(2, ("messaging_dgm_init failed: %s\n",
- nt_errstr(status)));
+ if (ret != 0) {
+ DEBUG(2, ("messaging_dgm_init failed: %s\n", strerror(ret)));
TALLOC_FREE(ctx);
return NULL;
}
@@ -278,16 +278,16 @@ struct server_id messaging_server_id(const struct messaging_context *msg_ctx)
NTSTATUS messaging_reinit(struct messaging_context *msg_ctx)
{
NTSTATUS status;
+ int ret;
TALLOC_FREE(msg_ctx->local);
msg_ctx->id = procid_self();
- status = messaging_dgm_init(msg_ctx, msg_ctx, &msg_ctx->local);
- if (!NT_STATUS_IS_OK(status)) {
- DEBUG(0, ("messaging_dgm_init failed: %s\n",
- nt_errstr(status)));
- return status;
+ ret = messaging_dgm_init(msg_ctx, msg_ctx, &msg_ctx->local);
+ if (ret != 0) {
+ DEBUG(0, ("messaging_dgm_init failed: %s\n", strerror(errno)));
+ return map_nt_error_from_unix(ret);
}
TALLOC_FREE(msg_ctx->remote);