s3: re-run make samba3-idl.
authorGünther Deschner <gd@samba.org>
Sat, 14 Mar 2009 02:00:51 +0000 (03:00 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 17 Mar 2009 09:58:07 +0000 (10:58 +0100)
Guenther

librpc/gen_ndr/cli_spoolss.c
librpc/gen_ndr/cli_spoolss.h
librpc/gen_ndr/ndr_spoolss.c
librpc/gen_ndr/spoolss.h
librpc/gen_ndr/srv_spoolss.c

index 2e0582e088c7c8cbde18bee4cdd34dbf2eeb1e7a..db1880692d6121b65e09f2e598f0e42b9b76b224 100644 (file)
@@ -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 */
index 3aebf3308ebe783066acf7e26231a55fa7a880b7..22bf03227095de45bc4e737914f654cef492fdfa 100644 (file)
@@ -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,
index 8c8b687a015fda537bae19b5df62a47dd18c2502..b45655e58e90fae4e4da7d4db63223148871da6f 100644 (file)
@@ -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);
index 77fb03ac898aee39dfb6dbfb6165934caa34806c..629de007b2b28271262dffa6e8400983dbae400f 100644 (file)
@@ -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;
index 9cb930f97976b3e6c5c5035baf453c5908c2ce2c..a7598e82015d9b4d8dd988758060d7c7501f4296 100644 (file)
@@ -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;