diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-10-10 07:55:46 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:15:22 -0500 |
commit | 6b0b563fa43ad4c7de3573dc7962a2698e140f72 (patch) | |
tree | b0bacef7886a01bcc716c29e3f359d866468d14c /source3/librpc/gen_ndr/srv_initshutdown.c | |
parent | b71a0be998c0171a01c632f3e14e9764c2dda6c2 (diff) | |
download | samba-6b0b563fa43ad4c7de3573dc7962a2698e140f72.tar.gz samba-6b0b563fa43ad4c7de3573dc7962a2698e140f72.tar.bz2 samba-6b0b563fa43ad4c7de3573dc7962a2698e140f72.zip |
r19221: Monster-Checkin after "make idl"
(This used to be commit 416466a16f58ac644baacaa2522c4e98176d0e70)
Diffstat (limited to 'source3/librpc/gen_ndr/srv_initshutdown.c')
-rw-r--r-- | source3/librpc/gen_ndr/srv_initshutdown.c | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/source3/librpc/gen_ndr/srv_initshutdown.c b/source3/librpc/gen_ndr/srv_initshutdown.c index 0bcadf423f..fab8288188 100644 --- a/source3/librpc/gen_ndr/srv_initshutdown.c +++ b/source3/librpc/gen_ndr/srv_initshutdown.c @@ -21,8 +21,10 @@ static BOOL api_initshutdown_Init(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_initshutdown_Init(pull, NDR_IN, &r); @@ -36,6 +38,12 @@ static BOOL api_initshutdown_Init(pipes_struct *p) r.out.result = _initshutdown_Init(p, r.in.hostname, r.in.message, r.in.timeout, r.in.force_apps, r.in.reboot); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(initshutdown_Init, &r); @@ -52,7 +60,7 @@ static BOOL api_initshutdown_Init(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -77,8 +85,10 @@ static BOOL api_initshutdown_Abort(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_initshutdown_Abort(pull, NDR_IN, &r); @@ -92,6 +102,12 @@ static BOOL api_initshutdown_Abort(pipes_struct *p) r.out.result = _initshutdown_Abort(p, r.in.server); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(initshutdown_Abort, &r); @@ -108,7 +124,7 @@ static BOOL api_initshutdown_Abort(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } @@ -133,8 +149,10 @@ static BOOL api_initshutdown_InitEx(pipes_struct *p) } pull = ndr_pull_init_blob(&blob, mem_ctx); - if (pull == NULL) + if (pull == NULL) { + talloc_free(mem_ctx); return False; + } pull->flags |= LIBNDR_FLAG_REF_ALLOC; status = ndr_pull_initshutdown_InitEx(pull, NDR_IN, &r); @@ -148,6 +166,12 @@ static BOOL api_initshutdown_InitEx(pipes_struct *p) r.out.result = _initshutdown_InitEx(p, r.in.hostname, r.in.message, r.in.timeout, r.in.force_apps, r.in.reboot, r.in.reason); + if (p->rng_fault_state) { + talloc_free(mem_ctx); + /* Return True here, srv_pipe_hnd.c will take care */ + return True; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(initshutdown_InitEx, &r); @@ -164,7 +188,7 @@ static BOOL api_initshutdown_InitEx(pipes_struct *p) } blob = ndr_push_blob(push); - if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { talloc_free(mem_ctx); return False; } |