summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-03-01 13:56:01 +0100
committerStefan Metzmacher <metze@samba.org>2010-03-01 16:11:53 +0100
commit5d33c6d4f9719e36a3ed0f6b54c4365324ff352c (patch)
treed3395c8417bffac5c08392eb2c7f55d02c800027 /source4/libnet
parent20980eb7870cf3478d9e8e78fb412c5bd299cca5 (diff)
downloadsamba-5d33c6d4f9719e36a3ed0f6b54c4365324ff352c.tar.gz
samba-5d33c6d4f9719e36a3ed0f6b54c4365324ff352c.tar.bz2
samba-5d33c6d4f9719e36a3ed0f6b54c4365324ff352c.zip
s4:libnet_become_dc: make use of explicit dcerpc_*_recv functions
metze
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_become_dc.c80
1 files changed, 9 insertions, 71 deletions
diff --git a/source4/libnet/libnet_become_dc.c b/source4/libnet/libnet_become_dc.c
index 0852373953..51246881e9 100644
--- a/source4/libnet/libnet_become_dc.c
+++ b/source4/libnet/libnet_become_dc.c
@@ -1714,19 +1714,9 @@ static void becomeDC_drsuapi1_bind_recv(struct rpc_request *req)
struct composite_context *c = s->creq;
WERROR status;
- bool print = false;
-
- if (req->p->conn->flags & DCERPC_DEBUG_PRINT_OUT) {
- print = true;
- }
-
- c->status = dcerpc_ndr_request_recv(req);
+ c->status = dcerpc_drsuapi_DsBind_recv(req);
if (!composite_is_ok(c)) return;
- if (print) {
- NDR_PRINT_OUT_DEBUG(drsuapi_DsBind, &s->drsuapi1.bind_r);
- }
-
status = becomeDC_drsuapi_bind_recv(s, &s->drsuapi1);
if (!W_ERROR_IS_OK(status)) {
composite_error(c, werror_to_ntstatus(status));
@@ -2270,19 +2260,11 @@ static void becomeDC_drsuapi1_add_entry_recv(struct rpc_request *req)
struct drsuapi_DsAddEntry *r = talloc_get_type(req->ndr.struct_ptr,
struct drsuapi_DsAddEntry);
char *binding_str;
- bool print = false;
- if (req->p->conn->flags & DCERPC_DEBUG_PRINT_OUT) {
- print = true;
- }
- c->status = dcerpc_ndr_request_recv(req);
+ c->status = dcerpc_drsuapi_DsAddEntry_recv(req);
if (!composite_is_ok(c)) return;
- if (print) {
- NDR_PRINT_OUT_DEBUG(drsuapi_DsAddEntry, r);
- }
-
if (!W_ERROR_IS_OK(r->out.result)) {
composite_error(c, werror_to_ntstatus(r->out.result));
return;
@@ -2402,19 +2384,9 @@ static void becomeDC_drsuapi2_bind_recv(struct rpc_request *req)
char *binding_str;
WERROR status;
- bool print = false;
-
- if (req->p->conn->flags & DCERPC_DEBUG_PRINT_OUT) {
- print = true;
- }
-
- c->status = dcerpc_ndr_request_recv(req);
+ c->status = dcerpc_drsuapi_DsBind_recv(req);
if (!composite_is_ok(c)) return;
- if (print) {
- NDR_PRINT_OUT_DEBUG(drsuapi_DsBind, &s->drsuapi2.bind_r);
- }
-
status = becomeDC_drsuapi_bind_recv(s, &s->drsuapi2);
if (!W_ERROR_IS_OK(status)) {
composite_error(c, werror_to_ntstatus(status));
@@ -2652,19 +2624,10 @@ static void becomeDC_drsuapi3_pull_schema_recv(struct rpc_request *req)
struct drsuapi_DsGetNCChanges);
WERROR status;
- bool print = false;
- if (req->p->conn->flags & DCERPC_DEBUG_PRINT_OUT) {
- print = true;
- }
-
- c->status = dcerpc_ndr_request_recv(req);
+ c->status = dcerpc_drsuapi_DsGetNCChanges_recv(req);
if (!composite_is_ok(c)) return;
- if (print) {
- NDR_PRINT_OUT_DEBUG(drsuapi_DsGetNCChanges, r);
- }
-
status = becomeDC_drsuapi_pull_partition_recv(s, &s->drsuapi2, &s->drsuapi3, &s->schema_part, r);
if (!W_ERROR_IS_OK(status)) {
composite_error(c, werror_to_ntstatus(status));
@@ -2717,19 +2680,10 @@ static void becomeDC_drsuapi3_pull_config_recv(struct rpc_request *req)
struct drsuapi_DsGetNCChanges);
WERROR status;
- bool print = false;
- if (req->p->conn->flags & DCERPC_DEBUG_PRINT_OUT) {
- print = true;
- }
-
- c->status = dcerpc_ndr_request_recv(req);
+ c->status = dcerpc_drsuapi_DsGetNCChanges_recv(req);
if (!composite_is_ok(c)) return;
- if (print) {
- NDR_PRINT_OUT_DEBUG(drsuapi_DsGetNCChanges, r);
- }
-
status = becomeDC_drsuapi_pull_partition_recv(s, &s->drsuapi2, &s->drsuapi3, &s->config_part, r);
if (!W_ERROR_IS_OK(status)) {
composite_error(c, werror_to_ntstatus(status));
@@ -2787,19 +2741,11 @@ static void becomeDC_drsuapi3_pull_domain_recv(struct rpc_request *req)
struct drsuapi_DsGetNCChanges *r = talloc_get_type(req->ndr.struct_ptr,
struct drsuapi_DsGetNCChanges);
WERROR status;
- bool print = false;
- if (req->p->conn->flags & DCERPC_DEBUG_PRINT_OUT) {
- print = true;
- }
- c->status = dcerpc_ndr_request_recv(req);
+ c->status = dcerpc_drsuapi_DsGetNCChanges_recv(req);
if (!composite_is_ok(c)) return;
- if (print) {
- NDR_PRINT_OUT_DEBUG(drsuapi_DsGetNCChanges, r);
- }
-
status = becomeDC_drsuapi_pull_partition_recv(s, &s->drsuapi2, &s->drsuapi3, &s->domain_part, r);
if (!W_ERROR_IS_OK(status)) {
composite_error(c, werror_to_ntstatus(status));
@@ -2865,19 +2811,11 @@ static void becomeDC_drsuapi2_update_refs_schema_recv(struct rpc_request *req)
struct composite_context *c = s->creq;
struct drsuapi_DsReplicaUpdateRefs *r = talloc_get_type(req->ndr.struct_ptr,
struct drsuapi_DsReplicaUpdateRefs);
- bool print = false;
- if (req->p->conn->flags & DCERPC_DEBUG_PRINT_OUT) {
- print = true;
- }
- c->status = dcerpc_ndr_request_recv(req);
+ c->status = dcerpc_drsuapi_DsReplicaUpdateRefs_recv(req);
if (!composite_is_ok(c)) return;
- if (print) {
- NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaUpdateRefs, r);
- }
-
if (!W_ERROR_IS_OK(r->out.result)) {
composite_error(c, werror_to_ntstatus(r->out.result));
return;
@@ -2899,7 +2837,7 @@ static void becomeDC_drsuapi2_update_refs_config_recv(struct rpc_request *req)
struct drsuapi_DsReplicaUpdateRefs *r = talloc_get_type(req->ndr.struct_ptr,
struct drsuapi_DsReplicaUpdateRefs);
- c->status = dcerpc_ndr_request_recv(req);
+ c->status = dcerpc_drsuapi_DsReplicaUpdateRefs_recv(req);
if (!composite_is_ok(c)) return;
if (!W_ERROR_IS_OK(r->out.result)) {
@@ -2921,7 +2859,7 @@ static void becomeDC_drsuapi2_update_refs_domain_recv(struct rpc_request *req)
struct drsuapi_DsReplicaUpdateRefs *r = talloc_get_type(req->ndr.struct_ptr,
struct drsuapi_DsReplicaUpdateRefs);
- c->status = dcerpc_ndr_request_recv(req);
+ c->status = dcerpc_drsuapi_DsReplicaUpdateRefs_recv(req);
if (!composite_is_ok(c)) return;
if (!W_ERROR_IS_OK(r->out.result)) {