summaryrefslogtreecommitdiff
path: root/source4/wrepl_server/wrepl_in_connection.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-11-09 19:24:51 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:45:02 +0100
commit529763a9aa192a6785ba878aceeb1683c2510913 (patch)
tree5fc843ffa644969ecd967d8b4133fc19333c33b5 /source4/wrepl_server/wrepl_in_connection.c
parentb2ddeeb79d2622b3fd216465716dfa6b8c3e0b86 (diff)
downloadsamba-529763a9aa192a6785ba878aceeb1683c2510913.tar.gz
samba-529763a9aa192a6785ba878aceeb1683c2510913.tar.bz2
samba-529763a9aa192a6785ba878aceeb1683c2510913.zip
r25920: ndr: change NTSTAUS into enum ndr_err_code (samba4 callers)
lib/messaging/ lib/registry/ lib/ldb-samba/ librpc/rpc/ auth/auth_winbind.c auth/gensec/ auth/kerberos/ dsdb/repl/ dsdb/samdb/ dsdb/schema/ torture/ cluster/ctdb/ kdc/ ntvfs/ipc/ torture/rap/ ntvfs/ utils/getntacl.c ntptr/ smb_server/ libcli/wrepl/ wrepl_server/ libcli/cldap/ libcli/dgram/ libcli/ldap/ libcli/raw/ libcli/nbt/ libnet/ winbind/ rpc_server/ metze (This used to be commit 6223c7fddc972687eb577e04fc1c8e0604c35435)
Diffstat (limited to 'source4/wrepl_server/wrepl_in_connection.c')
-rw-r--r--source4/wrepl_server/wrepl_in_connection.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source4/wrepl_server/wrepl_in_connection.c b/source4/wrepl_server/wrepl_in_connection.c
index 1178eb766e..d26c89d35d 100644
--- a/source4/wrepl_server/wrepl_in_connection.c
+++ b/source4/wrepl_server/wrepl_in_connection.c
@@ -55,6 +55,7 @@ static NTSTATUS wreplsrv_recv_request(void *private, DATA_BLOB blob)
DATA_BLOB packet_out_blob;
struct wrepl_wrap packet_out_wrap;
NTSTATUS status;
+ enum ndr_err_code ndr_err;
call = talloc_zero(wreplconn, struct wreplsrv_in_call);
NT_STATUS_HAVE_NO_MEMORY(call);
@@ -64,9 +65,11 @@ static NTSTATUS wreplsrv_recv_request(void *private, DATA_BLOB blob)
packet_in_blob.data = blob.data + 4;
packet_in_blob.length = blob.length - 4;
- status = ndr_pull_struct_blob(&packet_in_blob, call, &call->req_packet,
- (ndr_pull_flags_fn_t)ndr_pull_wrepl_packet);
- NT_STATUS_NOT_OK_RETURN(status);
+ ndr_err = ndr_pull_struct_blob(&packet_in_blob, call, &call->req_packet,
+ (ndr_pull_flags_fn_t)ndr_pull_wrepl_packet);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ return ndr_map_error2ntstatus(ndr_err);
+ }
if (DEBUGLVL(10)) {
DEBUG(10,("Received WINS-Replication packet of length %u\n",
@@ -85,9 +88,11 @@ static NTSTATUS wreplsrv_recv_request(void *private, DATA_BLOB blob)
/* and now encode the reply */
packet_out_wrap.packet = call->rep_packet;
- status = ndr_push_struct_blob(&packet_out_blob, call, &packet_out_wrap,
+ ndr_err = ndr_push_struct_blob(&packet_out_blob, call, &packet_out_wrap,
(ndr_push_flags_fn_t)ndr_push_wrepl_wrap);
- NT_STATUS_NOT_OK_RETURN(status);
+ if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ return ndr_map_error2ntstatus(ndr_err);
+ }
if (DEBUGLVL(10)) {
DEBUG(10,("Sending WINS-Replication packet of length %d\n", (int)packet_out_blob.length));