Re-run make idl.
authorGünther Deschner <gd@samba.org>
Sun, 17 Feb 2008 23:26:10 +0000 (00:26 +0100)
committerGünther Deschner <gd@samba.org>
Sun, 17 Feb 2008 23:26:10 +0000 (00:26 +0100)
Guenther

source/librpc/gen_ndr/cli_ntsvcs.c
source/librpc/gen_ndr/cli_ntsvcs.h
source/librpc/gen_ndr/ndr_ntsvcs.c
source/librpc/gen_ndr/ntsvcs.h
source/librpc/gen_ndr/srv_ntsvcs.c

index c21910c95bcb41d73f6f71721de5042b7aae3c4c..7f2758060582e613737f4b70b13901acadf9a7ed 100644 (file)
@@ -476,12 +476,17 @@ NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli,
 
 NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli,
                                      TALLOC_CTX *mem_ctx,
+                                     const char *devicename,
+                                     uint32_t *size,
+                                     uint32_t flags,
                                      WERROR *werror)
 {
        struct PNP_GetDeviceListSize r;
        NTSTATUS status;
 
        /* In parameters */
+       r.in.devicename = devicename;
+       r.in.flags = flags;
 
        if (DEBUGLEVEL >= 10) {
                NDR_PRINT_IN_DEBUG(PNP_GetDeviceListSize, &r);
@@ -507,6 +512,7 @@ NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli,
        }
 
        /* Return variables */
+       *size = *r.out.size;
 
        /* Return result */
        if (werror) {
index 666ea9bac8b25d88fd147d9cd90faaa55f79fed8..911200055f3c96c7ceac3d6e74b5b86920d7ccd4 100644 (file)
@@ -39,6 +39,9 @@ NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli,
                                  WERROR *werror);
 NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli,
                                      TALLOC_CTX *mem_ctx,
+                                     const char *devicename,
+                                     uint32_t *size,
+                                     uint32_t flags,
                                      WERROR *werror);
 NTSTATUS rpccli_PNP_GetDepth(struct rpc_pipe_client *cli,
                             TALLOC_CTX *mem_ctx,
index be553199473d5a45d467d570c301515b47332f75..c66ec2aa874aa71efef7f37c01582410ae06fb66 100644 (file)
@@ -498,8 +498,20 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceList(struct ndr_print *ndr, const char *nam
 static enum ndr_err_code ndr_push_PNP_GetDeviceListSize(struct ndr_push *ndr, int flags, const struct PNP_GetDeviceListSize *r)
 {
        if (flags & NDR_IN) {
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.devicename));
+               if (r->in.devicename) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.devicename, CH_UTF16)));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.devicename, CH_UTF16)));
+                       NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.devicename, ndr_charset_length(r->in.devicename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+               }
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
        }
        if (flags & NDR_OUT) {
+               if (r->out.size == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.size));
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
        }
        return NDR_ERR_SUCCESS;
@@ -507,9 +519,42 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceListSize(struct ndr_push *ndr, in
 
 static enum ndr_err_code ndr_pull_PNP_GetDeviceListSize(struct ndr_pull *ndr, int flags, struct PNP_GetDeviceListSize *r)
 {
+       uint32_t _ptr_devicename;
+       TALLOC_CTX *_mem_save_devicename_0;
+       TALLOC_CTX *_mem_save_size_0;
        if (flags & NDR_IN) {
+               ZERO_STRUCT(r->out);
+
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devicename));
+               if (_ptr_devicename) {
+                       NDR_PULL_ALLOC(ndr, r->in.devicename);
+               } else {
+                       r->in.devicename = NULL;
+               }
+               if (r->in.devicename) {
+                       _mem_save_devicename_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->in.devicename, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->in.devicename));
+                       NDR_CHECK(ndr_pull_array_length(ndr, &r->in.devicename));
+                       if (ndr_get_array_length(ndr, &r->in.devicename) > ndr_get_array_size(ndr, &r->in.devicename)) {
+                               return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.devicename), ndr_get_array_length(ndr, &r->in.devicename));
+                       }
+                       NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.devicename), sizeof(uint16_t)));
+                       NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.devicename, ndr_get_array_length(ndr, &r->in.devicename), sizeof(uint16_t), CH_UTF16));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devicename_0, 0);
+               }
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
+               NDR_PULL_ALLOC(ndr, r->out.size);
+               ZERO_STRUCTP(r->out.size);
        }
        if (flags & NDR_OUT) {
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->out.size);
+               }
+               _mem_save_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->out.size, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.size));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_size_0, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
        }
        return NDR_ERR_SUCCESS;
@@ -525,11 +570,22 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceListSize(struct ndr_print *ndr, const char
        if (flags & NDR_IN) {
                ndr_print_struct(ndr, "in", "PNP_GetDeviceListSize");
                ndr->depth++;
+               ndr_print_ptr(ndr, "devicename", r->in.devicename);
+               ndr->depth++;
+               if (r->in.devicename) {
+                       ndr_print_string(ndr, "devicename", r->in.devicename);
+               }
+               ndr->depth--;
+               ndr_print_uint32(ndr, "flags", r->in.flags);
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
                ndr_print_struct(ndr, "out", "PNP_GetDeviceListSize");
                ndr->depth++;
+               ndr_print_ptr(ndr, "size", r->out.size);
+               ndr->depth++;
+               ndr_print_uint32(ndr, "size", *r->out.size);
+               ndr->depth--;
                ndr_print_WERROR(ndr, "result", r->out.result);
                ndr->depth--;
        }
index 477d6adf7f94e053f4cb79e3d12e72393f5f923b..2384011789f76eeb9f59716f4f1691b3b70ebb8a 100644 (file)
@@ -102,6 +102,12 @@ struct PNP_GetDeviceList {
 
 struct PNP_GetDeviceListSize {
        struct {
+               const char *devicename;/* [unique,charset(UTF16)] */
+               uint32_t flags;
+       } in;
+
+       struct {
+               uint32_t *size;/* [ref] */
                WERROR result;
        } out;
 
index 7bbf9d1bfad2539cea035ebc0bc5dfc5138142bc..608353c480560d149bda27526155541cb729159a 100644 (file)
@@ -854,6 +854,13 @@ static bool api_PNP_GetDeviceListSize(pipes_struct *p)
                NDR_PRINT_IN_DEBUG(PNP_GetDeviceListSize, r);
        }
 
+       ZERO_STRUCT(r->out);
+       r->out.size = talloc_zero(r, uint32_t);
+       if (r->out.size == NULL) {
+               talloc_free(r);
+               return false;
+       }
+
        r->out.result = _PNP_GetDeviceListSize(p, r);
 
        if (p->rng_fault_state) {