diff options
author | Volker Lendecke <vl@sernet.de> | 2007-11-10 23:15:40 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-11-11 09:12:37 +0100 |
commit | f976f5e067e48a10178ff296d343ef5007695848 (patch) | |
tree | 41790b98e1416c57b24786958686cf28012e501c /source3/lib/ctdbd_conn.c | |
parent | c046a2f527939a09750e31f37db8e3c3e2b5b12e (diff) | |
download | samba-f976f5e067e48a10178ff296d343ef5007695848.tar.gz samba-f976f5e067e48a10178ff296d343ef5007695848.tar.xz samba-f976f5e067e48a10178ff296d343ef5007695848.zip |
Convert ctdb_conn.c to enum ndr_error_code
Fix the build
(This used to be commit 432d0e9cb2370e52f7d4cb58d2da747e526403e8)
Diffstat (limited to 'source3/lib/ctdbd_conn.c')
-rw-r--r-- | source3/lib/ctdbd_conn.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index 2892b8f6ab..b43aec7fd0 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -243,7 +243,7 @@ static struct messaging_rec *ctdb_pull_messaging_rec(TALLOC_CTX *mem_ctx, { struct messaging_rec *result; DATA_BLOB blob; - NTSTATUS status; + enum ndr_err_code ndr_err; if ((overall_length < offsetof(struct ctdb_req_message, data)) || (overall_length @@ -259,22 +259,22 @@ static struct messaging_rec *ctdb_pull_messaging_rec(TALLOC_CTX *mem_ctx, blob = data_blob_const(msg->data, msg->datalen); - status = ndr_pull_struct_blob( + ndr_err = ndr_pull_struct_blob( &blob, result, result, (ndr_pull_flags_fn_t)ndr_pull_messaging_rec); - if (DEBUGLEVEL >= 10) { - DEBUG(10, ("ctdb_pull_messaging_rec:\n")); - NDR_PRINT_DEBUG(messaging_rec, result); - } - - if (!NT_STATUS_IS_OK(status)) { + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { DEBUG(0, ("ndr_pull_struct_blob failed: %s\n", - nt_errstr(status))); + ndr_errstr(ndr_err))); TALLOC_FREE(result); return NULL; } + if (DEBUGLEVEL >= 10) { + DEBUG(10, ("ctdb_pull_messaging_rec:\n")); + NDR_PRINT_DEBUG(messaging_rec, result); + } + return result; } @@ -620,19 +620,20 @@ NTSTATUS ctdbd_messaging_send(struct ctdbd_connection *conn, TALLOC_CTX *mem_ctx; DATA_BLOB blob; NTSTATUS status; + enum ndr_err_code ndr_err; if (!(mem_ctx = talloc_init("ctdbd_messaging_send"))) { DEBUG(0, ("talloc failed\n")); return NT_STATUS_NO_MEMORY; } - status = ndr_push_struct_blob( + ndr_err = ndr_push_struct_blob( &blob, mem_ctx, msg, (ndr_push_flags_fn_t)ndr_push_messaging_rec); - if (!NT_STATUS_IS_OK(status)) { + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { DEBUG(0, ("ndr_push_struct_blob failed: %s\n", - nt_errstr(status))); + ndr_errstr(ndr_err))); goto fail; } |