The branch, master has been updated via 4f29e8a75c7ea63601724be2fd63eb776f839fde (commit) via 0d0aec18a2d2a49095da3fe1ac1dd51797c72d7d (commit) via db270e2f945e2da1ea70e44268e66be495cdeaee (commit) from a734c85c287ccf3280e7cefe69fae6b772b4ea8d (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 4f29e8a75c7ea63601724be2fd63eb776f839fde Merge: 0d0aec18a2d2a49095da3fe1ac1dd51797c72d7d a734c85c287ccf3280e7cefe69fae6b772b4ea8d Author: Jelmer Vernooij <jel...@samba.org> Date: Mon Feb 9 19:44:50 2009 +0100 Merge branch 'master' of ssh://git.samba.org/data/git/samba commit 0d0aec18a2d2a49095da3fe1ac1dd51797c72d7d Author: Jelmer Vernooij <jel...@samba.org> Date: Mon Feb 9 19:43:52 2009 +0100 Fix warning in spoolss IDL file output. commit db270e2f945e2da1ea70e44268e66be495cdeaee Author: Jelmer Vernooij <jel...@samba.org> Date: Mon Feb 9 19:43:06 2009 +0100 Rerun pidl. ----------------------------------------------------------------------- Summary of changes: librpc/gen_ndr/cli_spoolss.c | 2 +- librpc/gen_ndr/cli_spoolss.h | 2 +- librpc/gen_ndr/ndr_eventlog.c | 4 ++-- librpc/gen_ndr/ndr_ntsvcs.c | 4 ++-- librpc/gen_ndr/ndr_spoolss.c | 18 +++++------------- librpc/gen_ndr/ndr_svcctl.c | 12 ++++++------ librpc/gen_ndr/spoolss.h | 2 +- librpc/idl/spoolss.idl | 2 +- 8 files changed, 19 insertions(+), 27 deletions(-) Changeset truncated at 500 lines: diff --git a/librpc/gen_ndr/cli_spoolss.c b/librpc/gen_ndr/cli_spoolss.c index 1808684..3a6b53f 100644 --- a/librpc/gen_ndr/cli_spoolss.c +++ b/librpc/gen_ndr/cli_spoolss.c @@ -3370,7 +3370,7 @@ NTSTATUS rpccli_spoolss_EnumPrinterData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t enum_index /* [in] */, - const char *value_name /* [out] [ref,charset(UTF16),size_is(value_offered/2)] */, + const char *value_name /* [out] [charset(UTF16),size_is(value_offered/2)] */, uint32_t value_offered /* [in] */, uint32_t *value_needed /* [out] [ref] */, uint32_t *printerdata_type /* [out] [ref] */, diff --git a/librpc/gen_ndr/cli_spoolss.h b/librpc/gen_ndr/cli_spoolss.h index 516c2c0..2447f18 100644 --- a/librpc/gen_ndr/cli_spoolss.h +++ b/librpc/gen_ndr/cli_spoolss.h @@ -412,7 +412,7 @@ NTSTATUS rpccli_spoolss_EnumPrinterData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t enum_index /* [in] */, - const char *value_name /* [out] [ref,charset(UTF16),size_is(value_offered/2)] */, + const char *value_name /* [out] [charset(UTF16),size_is(value_offered/2)] */, uint32_t value_offered /* [in] */, uint32_t *value_needed /* [out] [ref] */, uint32_t *printerdata_type /* [out] [ref] */, diff --git a/librpc/gen_ndr/ndr_eventlog.c b/librpc/gen_ndr/ndr_eventlog.c index b80f613..0d5654c 100644 --- a/librpc/gen_ndr/ndr_eventlog.c +++ b/librpc/gen_ndr/ndr_eventlog.c @@ -1783,7 +1783,7 @@ static enum ndr_err_code ndr_pull_eventlog_ReadEventLogW(struct ndr_pull *ndr, i return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); } NDR_PULL_ALLOC_N(ndr, r->out.data, r->in.number_of_bytes); - memset(CONST_DISCARD(struct eventlog_ReadEventLogW *,r->out.data), 0, (r->in.number_of_bytes) * sizeof(*r->out.data)); + memset(r->out.data, 0, (r->in.number_of_bytes) * sizeof(*r->out.data)); NDR_PULL_ALLOC(ndr, r->out.sent_size); ZERO_STRUCTP(r->out.sent_size); NDR_PULL_ALLOC(ndr, r->out.real_size); @@ -2634,7 +2634,7 @@ static enum ndr_err_code ndr_pull_eventlog_GetLogIntormation(struct ndr_pull *nd return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); } NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.buf_size); - memset(CONST_DISCARD(struct eventlog_GetLogIntormation *,r->out.buffer), 0, (r->in.buf_size) * sizeof(*r->out.buffer)); + memset(r->out.buffer, 0, (r->in.buf_size) * sizeof(*r->out.buffer)); NDR_PULL_ALLOC(ndr, r->out.bytes_needed); ZERO_STRUCTP(r->out.bytes_needed); } diff --git a/librpc/gen_ndr/ndr_ntsvcs.c b/librpc/gen_ndr/ndr_ntsvcs.c index 32040d9..ef2ecc1 100644 --- a/librpc/gen_ndr/ndr_ntsvcs.c +++ b/librpc/gen_ndr/ndr_ntsvcs.c @@ -580,7 +580,7 @@ static enum ndr_err_code ndr_pull_PNP_GetDeviceList(struct ndr_pull *ndr, int fl NDR_PULL_SET_MEM_CTX(ndr, _mem_save_length_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags)); NDR_PULL_ALLOC_N(ndr, r->out.buffer, *r->in.length); - memset(CONST_DISCARD(struct PNP_GetDeviceList *,r->out.buffer), 0, (*r->in.length) * sizeof(*r->out.buffer)); + memset(r->out.buffer, 0, (*r->in.length) * sizeof(*r->out.buffer)); NDR_PULL_ALLOC(ndr, r->out.length); *r->out.length = *r->in.length; } @@ -896,7 +896,7 @@ static enum ndr_err_code ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int NDR_PULL_ALLOC(ndr, r->out.reg_data_type); *r->out.reg_data_type = *r->in.reg_data_type; NDR_PULL_ALLOC_N(ndr, r->out.buffer, *r->in.buffer_size); - memset(CONST_DISCARD(struct PNP_GetDeviceRegProp *,r->out.buffer), 0, (*r->in.buffer_size) * sizeof(*r->out.buffer)); + memset(r->out.buffer, 0, (*r->in.buffer_size) * sizeof(*r->out.buffer)); NDR_PULL_ALLOC(ndr, r->out.buffer_size); *r->out.buffer_size = *r->in.buffer_size; NDR_PULL_ALLOC(ndr, r->out.needed); diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c index c7cf516..8c23069 100644 --- a/librpc/gen_ndr/ndr_spoolss.c +++ b/librpc/gen_ndr/ndr_spoolss.c @@ -11546,7 +11546,7 @@ static enum ndr_err_code ndr_pull_spoolss_ReadPrinter(struct ndr_pull *ndr, int NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.data_size)); NDR_PULL_ALLOC_N(ndr, r->out.data, r->in.data_size); - memset(CONST_DISCARD(struct spoolss_ReadPrinter *,r->out.data), 0, (r->in.data_size) * sizeof(*r->out.data)); + memset(r->out.data, 0, (r->in.data_size) * sizeof(*r->out.data)); NDR_PULL_ALLOC(ndr, r->out._data_size); ZERO_STRUCTP(r->out._data_size); } @@ -15247,9 +15247,6 @@ static enum ndr_err_code ndr_push_spoolss_EnumPrinterData(struct ndr_push *ndr, NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.data_offered)); } if (flags & NDR_OUT) { - if (r->out.value_name == NULL) { - return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); - } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.value_offered / 2)); NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->out.value_name, r->in.value_offered / 2, sizeof(uint16_t), CH_UTF16)); if (r->out.value_needed == NULL) { @@ -15293,8 +15290,6 @@ static enum ndr_err_code ndr_pull_spoolss_EnumPrinterData(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.enum_index)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.value_offered)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.data_offered)); - NDR_PULL_ALLOC_N(ndr, r->out.value_name, r->in.value_offered / 2); - memset(CONST_DISCARD(struct spoolss_EnumPrinterData *,r->out.value_name), 0, (r->in.value_offered / 2) * sizeof(*r->out.value_name)); NDR_PULL_ALLOC(ndr, r->out.value_needed); ZERO_STRUCTP(r->out.value_needed); NDR_PULL_ALLOC(ndr, r->out.printerdata_type); @@ -15365,10 +15360,7 @@ _PUBLIC_ void ndr_print_spoolss_EnumPrinterData(struct ndr_print *ndr, const cha if (flags & NDR_OUT) { ndr_print_struct(ndr, "out", "spoolss_EnumPrinterData"); ndr->depth++; - ndr_print_ptr(ndr, "value_name", r->out.value_name); - ndr->depth++; ndr_print_string(ndr, "value_name", r->out.value_name); - ndr->depth--; ndr_print_ptr(ndr, "value_needed", r->out.value_needed); ndr->depth++; ndr_print_uint32(ndr, "value_needed", *r->out.value_needed); @@ -15742,7 +15734,7 @@ static enum ndr_err_code ndr_pull_spoolss_GetPrinterDataEx(struct ndr_pull *ndr, NDR_PULL_ALLOC(ndr, r->out.type); ZERO_STRUCTP(r->out.type); NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered); - memset(CONST_DISCARD(struct spoolss_GetPrinterDataEx *,r->out.buffer), 0, (r->in.offered) * sizeof(*r->out.buffer)); + memset(r->out.buffer, 0, (r->in.offered) * sizeof(*r->out.buffer)); NDR_PULL_ALLOC(ndr, r->out.needed); ZERO_STRUCTP(r->out.needed); } @@ -15870,7 +15862,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_EnumPrinterDataEx(struct ndr_pull *n NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.key_name, ndr_get_array_length(ndr, &r->in.key_name), sizeof(uint16_t), CH_UTF16)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered)); NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered); - memset(CONST_DISCARD(struct spoolss_EnumPrinterDataEx *,r->out.buffer), 0, (r->in.offered) * sizeof(*r->out.buffer)); + memset(r->out.buffer, 0, (r->in.offered) * sizeof(*r->out.buffer)); NDR_PULL_ALLOC(ndr, r->out.needed); ZERO_STRUCTP(r->out.needed); NDR_PULL_ALLOC(ndr, r->out.count); @@ -15999,7 +15991,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_EnumPrinterKey(struct ndr_pull *ndr, NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.key_name, ndr_get_array_length(ndr, &r->in.key_name), sizeof(uint16_t), CH_UTF16)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.key_buffer_size)); NDR_PULL_ALLOC_N(ndr, r->out.key_buffer, r->in.key_buffer_size / 2); - memset(CONST_DISCARD(struct spoolss_EnumPrinterKey *,r->out.key_buffer), 0, (r->in.key_buffer_size / 2) * sizeof(*r->out.key_buffer)); + memset(r->out.key_buffer, 0, (r->in.key_buffer_size / 2) * sizeof(*r->out.key_buffer)); NDR_PULL_ALLOC(ndr, r->out.needed); ZERO_STRUCTP(r->out.needed); } @@ -16563,7 +16555,7 @@ static enum ndr_err_code ndr_pull_spoolss_XcvData(struct ndr_pull *ndr, int flag NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.status_code)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_status_code_0, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_ALLOC_N(ndr, r->out.out_data, r->in.out_data_size); - memset(CONST_DISCARD(struct spoolss_XcvData *,r->out.out_data), 0, (r->in.out_data_size) * sizeof(*r->out.out_data)); + memset(r->out.out_data, 0, (r->in.out_data_size) * sizeof(*r->out.out_data)); NDR_PULL_ALLOC(ndr, r->out.needed); ZERO_STRUCTP(r->out.needed); NDR_PULL_ALLOC(ndr, r->out.status_code); diff --git a/librpc/gen_ndr/ndr_svcctl.c b/librpc/gen_ndr/ndr_svcctl.c index fc59371..6101b7d 100644 --- a/librpc/gen_ndr/ndr_svcctl.c +++ b/librpc/gen_ndr/ndr_svcctl.c @@ -1631,7 +1631,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceObjectSecurity(struct ndr_p return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); } NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.buffer_size); - memset(CONST_DISCARD(struct svcctl_QueryServiceObjectSecurity *,r->out.buffer), 0, (r->in.buffer_size) * sizeof(*r->out.buffer)); + memset(r->out.buffer, 0, (r->in.buffer_size) * sizeof(*r->out.buffer)); NDR_PULL_ALLOC(ndr, r->out.needed); ZERO_STRUCTP(r->out.needed); } @@ -2733,7 +2733,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); } NDR_PULL_ALLOC_N(ndr, r->out.service_status, r->in.buf_size); - memset(CONST_DISCARD(struct svcctl_EnumDependentServicesW *,r->out.service_status), 0, (r->in.buf_size) * sizeof(*r->out.service_status)); + memset(r->out.service_status, 0, (r->in.buf_size) * sizeof(*r->out.service_status)); NDR_PULL_ALLOC(ndr, r->out.bytes_needed); ZERO_STRUCTP(r->out.bytes_needed); NDR_PULL_ALLOC(ndr, r->out.services_returned); @@ -2886,7 +2886,7 @@ static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *nd NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0); } NDR_PULL_ALLOC_N(ndr, r->out.service, r->in.buf_size); - memset(CONST_DISCARD(struct svcctl_EnumServicesStatusW *,r->out.service), 0, (r->in.buf_size) * sizeof(*r->out.service)); + memset(r->out.service, 0, (r->in.buf_size) * sizeof(*r->out.service)); NDR_PULL_ALLOC(ndr, r->out.bytes_needed); ZERO_STRUCTP(r->out.bytes_needed); NDR_PULL_ALLOC(ndr, r->out.services_returned); @@ -6091,7 +6091,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2W(struct ndr_pull *n return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); } NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.buf_size); - memset(CONST_DISCARD(struct svcctl_QueryServiceConfig2W *,r->out.buffer), 0, (r->in.buf_size) * sizeof(*r->out.buffer)); + memset(r->out.buffer, 0, (r->in.buf_size) * sizeof(*r->out.buffer)); NDR_PULL_ALLOC(ndr, r->out.bytes_needed); ZERO_STRUCTP(r->out.bytes_needed); } @@ -6199,7 +6199,7 @@ static enum ndr_err_code ndr_pull_svcctl_QueryServiceStatusEx(struct ndr_pull *n return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); } NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.buf_size); - memset(CONST_DISCARD(struct svcctl_QueryServiceStatusEx *,r->out.buffer), 0, (r->in.buf_size) * sizeof(*r->out.buffer)); + memset(r->out.buffer, 0, (r->in.buf_size) * sizeof(*r->out.buffer)); NDR_PULL_ALLOC(ndr, r->out.bytes_needed); ZERO_STRUCTP(r->out.bytes_needed); } @@ -6573,7 +6573,7 @@ static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, in NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_0, 0); } NDR_PULL_ALLOC_N(ndr, r->out.services, r->in.buf_size); - memset(CONST_DISCARD(struct EnumServicesStatusExW *,r->out.services), 0, (r->in.buf_size) * sizeof(*r->out.services)); + memset(r->out.services, 0, (r->in.buf_size) * sizeof(*r->out.services)); NDR_PULL_ALLOC(ndr, r->out.bytes_needed); ZERO_STRUCTP(r->out.bytes_needed); NDR_PULL_ALLOC(ndr, r->out.service_returned); diff --git a/librpc/gen_ndr/spoolss.h b/librpc/gen_ndr/spoolss.h index 36950b0..33f6042 100644 --- a/librpc/gen_ndr/spoolss.h +++ b/librpc/gen_ndr/spoolss.h @@ -1961,7 +1961,7 @@ struct spoolss_EnumPrinterData { } in; struct { - const char *value_name;/* [ref,charset(UTF16),size_is(value_offered/2)] */ + const char *value_name;/* [charset(UTF16),size_is(value_offered/2)] */ uint32_t *value_needed;/* [ref] */ uint32_t *printerdata_type;/* [ref] */ DATA_BLOB *buffer;/* [ref] */ diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl index 09646c9..bb2bb3d 100644 --- a/librpc/idl/spoolss.idl +++ b/librpc/idl/spoolss.idl @@ -1478,7 +1478,7 @@ import "misc.idl", "security.idl", "winreg.idl"; WERROR spoolss_EnumPrinterData( [in,ref] policy_handle *handle, [in] uint32 enum_index, - [out,ref,size_is(value_offered/2),charset(UTF16)] uint16 *value_name, + [out,size_is(value_offered/2),charset(UTF16)] uint16 value_name[], [in] uint32 value_offered, [out,ref] uint32 *value_needed, [out,ref] uint32 *printerdata_type, -- Samba Shared Repository