summaryrefslogtreecommitdiff
path: root/librpc/gen_ndr
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-03-14 03:00:51 +0100
committerGünther Deschner <gd@samba.org>2009-03-17 10:58:07 +0100
commit4de3a46c8626d4efb3479af0427edb82fc0aa34d (patch)
tree8dba0c40b232706a49051d0ebbe78b5a46fc2b70 /librpc/gen_ndr
parent92e6525ae124c97d31a46b9fe3d6d1415c219e9f (diff)
downloadsamba-4de3a46c8626d4efb3479af0427edb82fc0aa34d.tar.gz
samba-4de3a46c8626d4efb3479af0427edb82fc0aa34d.tar.bz2
samba-4de3a46c8626d4efb3479af0427edb82fc0aa34d.zip
s3: re-run make samba3-idl.
Guenther
Diffstat (limited to 'librpc/gen_ndr')
-rw-r--r--librpc/gen_ndr/cli_spoolss.c4
-rw-r--r--librpc/gen_ndr/cli_spoolss.h2
-rw-r--r--librpc/gen_ndr/ndr_spoolss.c43
-rw-r--r--librpc/gen_ndr/spoolss.h6
-rw-r--r--librpc/gen_ndr/srv_spoolss.c11
5 files changed, 52 insertions, 14 deletions
diff --git a/librpc/gen_ndr/cli_spoolss.c b/librpc/gen_ndr/cli_spoolss.c
index 2e0582e088..db1880692d 100644
--- a/librpc/gen_ndr/cli_spoolss.c
+++ b/librpc/gen_ndr/cli_spoolss.c
@@ -1303,7 +1303,7 @@ NTSTATUS rpccli_spoolss_GetPrinterData(struct rpc_pipe_client *cli,
const char *value_name /* [in] [charset(UTF16)] */,
uint32_t offered /* [in] */,
enum spoolss_PrinterDataType *type /* [out] [ref] */,
- union spoolss_PrinterData data /* [out] [subcontext_size(offered),subcontext(4),switch_is(*type)] */,
+ union spoolss_PrinterData *data /* [out] [subcontext_size(offered),ref,subcontext(4),switch_is(*type)] */,
uint32_t *needed /* [out] [ref] */,
WERROR *werror)
{
@@ -1339,7 +1339,7 @@ NTSTATUS rpccli_spoolss_GetPrinterData(struct rpc_pipe_client *cli,
/* Return variables */
*type = *r.out.type;
- return NT_STATUS_NOT_SUPPORTED;
+ *data = *r.out.data;
*needed = *r.out.needed;
/* Return result */
diff --git a/librpc/gen_ndr/cli_spoolss.h b/librpc/gen_ndr/cli_spoolss.h
index 3aebf3308e..22bf032270 100644
--- a/librpc/gen_ndr/cli_spoolss.h
+++ b/librpc/gen_ndr/cli_spoolss.h
@@ -192,7 +192,7 @@ NTSTATUS rpccli_spoolss_GetPrinterData(struct rpc_pipe_client *cli,
const char *value_name /* [in] [charset(UTF16)] */,
uint32_t offered /* [in] */,
enum spoolss_PrinterDataType *type /* [out] [ref] */,
- union spoolss_PrinterData data /* [out] [subcontext_size(offered),subcontext(4),switch_is(*type)] */,
+ union spoolss_PrinterData *data /* [out] [subcontext_size(offered),ref,subcontext(4),switch_is(*type)] */,
uint32_t *needed /* [out] [ref] */,
WERROR *werror);
NTSTATUS rpccli_spoolss_SetPrinterData(struct rpc_pipe_client *cli,
diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c
index 8c8b687a01..b45655e58e 100644
--- a/librpc/gen_ndr/ndr_spoolss.c
+++ b/librpc/gen_ndr/ndr_spoolss.c
@@ -21611,7 +21611,10 @@ _PUBLIC_ enum ndr_err_code ndr_push__spoolss_GetPrinterData(struct ndr_push *ndr
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_spoolss_PrinterDataType(ndr, NDR_SCALARS, *r->out.type));
- NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->out.data));
+ if (r->out.data == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.data));
if (r->out.needed == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -21625,6 +21628,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_GetPrinterData(struct ndr_pull *ndr
{
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_type_0;
+ TALLOC_CTX *_mem_save_data_0;
TALLOC_CTX *_mem_save_needed_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -21646,6 +21650,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_GetPrinterData(struct ndr_pull *ndr
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
NDR_PULL_ALLOC(ndr, r->out.type);
ZERO_STRUCTP(r->out.type);
+ NDR_PULL_ALLOC(ndr, r->out.data);
+ ZERO_STRUCTP(r->out.data);
NDR_PULL_ALLOC(ndr, r->out.needed);
ZERO_STRUCTP(r->out.needed);
}
@@ -21657,7 +21663,13 @@ _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_GetPrinterData(struct ndr_pull *ndr
NDR_PULL_SET_MEM_CTX(ndr, r->out.type, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_spoolss_PrinterDataType(ndr, NDR_SCALARS, r->out.type));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->out.data));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.data);
+ }
+ _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.data, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.data));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.needed);
}
@@ -21676,22 +21688,34 @@ _PUBLIC_ enum ndr_err_code ndr_push___spoolss_GetPrinterData(struct ndr_push *nd
NDR_CHECK(ndr_push_spoolss_PrinterDataType(ndr, NDR_SCALARS, r->in.type));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.data, r->in.type));
- NDR_CHECK(ndr_push_spoolss_PrinterData(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.data));
+ if (r->out.data == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.data, r->in.type));
+ NDR_CHECK(ndr_push_spoolss_PrinterData(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.data));
}
return NDR_ERR_SUCCESS;
}
_PUBLIC_ enum ndr_err_code ndr_pull___spoolss_GetPrinterData(struct ndr_pull *ndr, int flags, struct __spoolss_GetPrinterData *r)
{
+ TALLOC_CTX *_mem_save_data_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
NDR_CHECK(ndr_pull_spoolss_PrinterDataType(ndr, NDR_SCALARS, &r->in.type));
+ NDR_PULL_ALLOC(ndr, r->out.data);
+ ZERO_STRUCTP(r->out.data);
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.data, r->in.type));
- NDR_CHECK(ndr_pull_spoolss_PrinterData(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.data));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.data);
+ }
+ _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.data, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.data, r->in.type));
+ NDR_CHECK(ndr_pull_spoolss_PrinterData(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.data));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
}
return NDR_ERR_SUCCESS;
}
@@ -21721,8 +21745,11 @@ _PUBLIC_ void ndr_print_spoolss_GetPrinterData(struct ndr_print *ndr, const char
ndr->depth++;
ndr_print_spoolss_PrinterDataType(ndr, "type", *r->out.type);
ndr->depth--;
- ndr_print_set_switch_value(ndr, &r->out.data, *r->out.type);
- ndr_print_spoolss_PrinterData(ndr, "data", &r->out.data);
+ ndr_print_ptr(ndr, "data", r->out.data);
+ ndr->depth++;
+ ndr_print_set_switch_value(ndr, r->out.data, *r->out.type);
+ ndr_print_spoolss_PrinterData(ndr, "data", r->out.data);
+ ndr->depth--;
ndr_print_ptr(ndr, "needed", r->out.needed);
ndr->depth++;
ndr_print_uint32(ndr, "needed", *r->out.needed);
diff --git a/librpc/gen_ndr/spoolss.h b/librpc/gen_ndr/spoolss.h
index 77fb03ac89..629de007b2 100644
--- a/librpc/gen_ndr/spoolss.h
+++ b/librpc/gen_ndr/spoolss.h
@@ -2088,7 +2088,7 @@ struct _spoolss_GetPrinterData {
struct {
enum spoolss_PrinterDataType *type;/* [ref] */
- DATA_BLOB data;
+ DATA_BLOB *data;/* [ref] */
uint32_t *needed;/* [ref] */
WERROR result;
} out;
@@ -2102,7 +2102,7 @@ struct __spoolss_GetPrinterData {
} in;
struct {
- union spoolss_PrinterData data;/* [switch_is(type)] */
+ union spoolss_PrinterData *data;/* [ref,switch_is(type)] */
} out;
};
@@ -2117,7 +2117,7 @@ struct spoolss_GetPrinterData {
struct {
enum spoolss_PrinterDataType *type;/* [ref] */
- union spoolss_PrinterData data;/* [subcontext_size(offered),subcontext(4),switch_is(*type)] */
+ union spoolss_PrinterData *data;/* [subcontext_size(offered),ref,subcontext(4),switch_is(*type)] */
uint32_t *needed;/* [ref] */
WERROR result;
} out;
diff --git a/librpc/gen_ndr/srv_spoolss.c b/librpc/gen_ndr/srv_spoolss.c
index 9cb930f979..a7598e8201 100644
--- a/librpc/gen_ndr/srv_spoolss.c
+++ b/librpc/gen_ndr/srv_spoolss.c
@@ -2119,6 +2119,12 @@ static bool api_spoolss_GetPrinterData(pipes_struct *p)
return false;
}
+ r->out.data = talloc_zero(r, union spoolss_PrinterData);
+ if (r->out.data == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
r->out.needed = talloc_zero(r, uint32_t);
if (r->out.needed == NULL) {
talloc_free(r);
@@ -7870,6 +7876,11 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
return NT_STATUS_NO_MEMORY;
}
+ r->out.data = talloc_zero(mem_ctx, union spoolss_PrinterData);
+ if (r->out.data == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
r->out.needed = talloc_zero(mem_ctx, uint32_t);
if (r->out.needed == NULL) {
return NT_STATUS_NO_MEMORY;