The branch, v3-2-test has been updated
       via  39e9cfa3018786f176aeb237ea7805da4e576c62 (commit)
       via  1e7d77766e282c8c20d03d1b1e80346468848ea9 (commit)
      from  6ffd6c814fafe4112fe72a96a0893d5be06f4380 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 39e9cfa3018786f176aeb237ea7805da4e576c62
Author: Günther Deschner <[EMAIL PROTECTED]>
Date:   Fri Mar 7 23:55:52 2008 +0100

    Re-run make idl.
    
    Guenther

commit 1e7d77766e282c8c20d03d1b1e80346468848ea9
Author: Günther Deschner <[EMAIL PROTECTED]>
Date:   Fri Mar 7 23:55:01 2008 +0100

    Fix IDL for srvsvc_NetShareAdd().
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source/librpc/gen_ndr/cli_srvsvc.c |    2 +-
 source/librpc/gen_ndr/cli_srvsvc.h |    2 +-
 source/librpc/gen_ndr/ndr_srvsvc.c |   25 +++++++++++++++++++------
 source/librpc/gen_ndr/srvsvc.h     |    2 +-
 source/librpc/idl/srvsvc.idl       |    2 +-
 5 files changed, 23 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/librpc/gen_ndr/cli_srvsvc.c 
b/source/librpc/gen_ndr/cli_srvsvc.c
index a9d3399..02c11ab 100644
--- a/source/librpc/gen_ndr/cli_srvsvc.c
+++ b/source/librpc/gen_ndr/cli_srvsvc.c
@@ -760,7 +760,7 @@ NTSTATUS rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client 
*cli,
                                   TALLOC_CTX *mem_ctx,
                                   const char *server_unc,
                                   uint32_t level,
-                                  union srvsvc_NetShareInfo info,
+                                  union srvsvc_NetShareInfo *info,
                                   uint32_t *parm_error,
                                   WERROR *werror)
 {
diff --git a/source/librpc/gen_ndr/cli_srvsvc.h 
b/source/librpc/gen_ndr/cli_srvsvc.h
index b8bdac2..d4acc92 100644
--- a/source/librpc/gen_ndr/cli_srvsvc.h
+++ b/source/librpc/gen_ndr/cli_srvsvc.h
@@ -114,7 +114,7 @@ NTSTATUS rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client 
*cli,
                                   TALLOC_CTX *mem_ctx,
                                   const char *server_unc,
                                   uint32_t level,
-                                  union srvsvc_NetShareInfo info,
+                                  union srvsvc_NetShareInfo *info,
                                   uint32_t *parm_error,
                                   WERROR *werror);
 NTSTATUS rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli,
diff --git a/source/librpc/gen_ndr/ndr_srvsvc.c 
b/source/librpc/gen_ndr/ndr_srvsvc.c
index 2244a3e..568d380 100644
--- a/source/librpc/gen_ndr/ndr_srvsvc.c
+++ b/source/librpc/gen_ndr/ndr_srvsvc.c
@@ -15232,8 +15232,11 @@ static enum ndr_err_code 
ndr_push_srvsvc_NetShareAdd(struct ndr_push *ndr, int f
                        NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, 
r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), 
sizeof(uint16_t), CH_UTF16));
                }
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
-               NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, 
r->in.level));
-               NDR_CHECK(ndr_push_srvsvc_NetShareInfo(ndr, 
NDR_SCALARS|NDR_BUFFERS, &r->in.info));
+               if (r->in.info == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, 
"NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, 
r->in.level));
+               NDR_CHECK(ndr_push_srvsvc_NetShareInfo(ndr, 
NDR_SCALARS|NDR_BUFFERS, r->in.info));
                NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
                if (r->in.parm_error) {
                        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 
*r->in.parm_error));
@@ -15254,6 +15257,7 @@ static enum ndr_err_code 
ndr_pull_srvsvc_NetShareAdd(struct ndr_pull *ndr, int f
        uint32_t _ptr_server_unc;
        uint32_t _ptr_parm_error;
        TALLOC_CTX *_mem_save_server_unc_0;
+       TALLOC_CTX *_mem_save_info_0;
        TALLOC_CTX *_mem_save_parm_error_0;
        if (flags & NDR_IN) {
                ZERO_STRUCT(r->out);
@@ -15277,8 +15281,14 @@ static enum ndr_err_code 
ndr_pull_srvsvc_NetShareAdd(struct ndr_pull *ndr, int f
                        NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
                }
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
-               NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, 
r->in.level));
-               NDR_CHECK(ndr_pull_srvsvc_NetShareInfo(ndr, 
NDR_SCALARS|NDR_BUFFERS, &r->in.info));
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.info);
+               }
+               _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, 
r->in.level));
+               NDR_CHECK(ndr_pull_srvsvc_NetShareInfo(ndr, 
NDR_SCALARS|NDR_BUFFERS, r->in.info));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 
LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
                if (_ptr_parm_error) {
                        NDR_PULL_ALLOC(ndr, r->in.parm_error);
@@ -15327,8 +15337,11 @@ _PUBLIC_ void ndr_print_srvsvc_NetShareAdd(struct 
ndr_print *ndr, const char *na
                }
                ndr->depth--;
                ndr_print_uint32(ndr, "level", r->in.level);
-               ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
-               ndr_print_srvsvc_NetShareInfo(ndr, "info", &r->in.info);
+               ndr_print_ptr(ndr, "info", r->in.info);
+               ndr->depth++;
+               ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
+               ndr_print_srvsvc_NetShareInfo(ndr, "info", r->in.info);
+               ndr->depth--;
                ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
                ndr->depth++;
                if (r->in.parm_error) {
diff --git a/source/librpc/gen_ndr/srvsvc.h b/source/librpc/gen_ndr/srvsvc.h
index e05a6f0..8b85736 100644
--- a/source/librpc/gen_ndr/srvsvc.h
+++ b/source/librpc/gen_ndr/srvsvc.h
@@ -1252,7 +1252,7 @@ struct srvsvc_NetShareAdd {
        struct {
                const char *server_unc;/* [unique,charset(UTF16)] */
                uint32_t level;
-               union srvsvc_NetShareInfo info;/* [switch_is(level)] */
+               union srvsvc_NetShareInfo *info;/* [ref,switch_is(level)] */
                uint32_t *parm_error;/* [unique] */
        } in;
 
diff --git a/source/librpc/idl/srvsvc.idl b/source/librpc/idl/srvsvc.idl
index 86fdeba..4ad7ca4 100644
--- a/source/librpc/idl/srvsvc.idl
+++ b/source/librpc/idl/srvsvc.idl
@@ -552,7 +552,7 @@ import "security.idl", "svcctl.idl";
        WERROR srvsvc_NetShareAdd(
                [in,unique]   [string,charset(UTF16)] uint16 *server_unc,
                [in]   uint32 level,
-               [in,switch_is(level)] srvsvc_NetShareInfo info,
+               [in,ref,switch_is(level)] srvsvc_NetShareInfo *info,
                [in,out,unique]   uint32 *parm_error
                );
 


-- 
Samba Shared Repository

Reply via email to