s4-srvsvc: merge srvsvc_NetCharDevGetInfo from s3 idl.
authorGünther Deschner <gd@samba.org>
Wed, 29 Oct 2008 19:44:04 +0000 (20:44 +0100)
committerGünther Deschner <gd@samba.org>
Fri, 31 Oct 2008 01:44:32 +0000 (02:44 +0100)
Guenther

source4/librpc/idl/srvsvc.idl
source4/rpc_server/srvsvc/dcesrv_srvsvc.c
source4/torture/rpc/srvsvc.c

index 918c8ba0ca30e8b6194a7016912ede2d571f4736..ae593657413944e0166a408c3591ba95f945723d 100644 (file)
@@ -68,7 +68,7 @@ import "security.idl", "svcctl.idl";
                [in,unique] [string,charset(UTF16)] uint16 *server_unc,
                [in]   [string,charset(UTF16)] uint16 device_name[],
                [in]   uint32 level,
-               [out,switch_is(level)]   srvsvc_NetCharDevInfo info
+               [out,ref,switch_is(level)]   srvsvc_NetCharDevInfo *info
                );
 
        /******************/
index d14d80b8069bcf4b5b37ece08b792a8d62c7e97b..b5c0756a2b2ddb501cf9b74527199509b4b5f57e 100644 (file)
@@ -82,7 +82,7 @@ static WERROR dcesrv_srvsvc_NetCharDevEnum(struct dcesrv_call_state *dce_call, T
 static WERROR dcesrv_srvsvc_NetCharDevGetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
                       struct srvsvc_NetCharDevGetInfo *r)
 {
-       ZERO_STRUCT(r->out);
+       ZERO_STRUCTP(r->out.info);
 
        switch (r->in.level) {
        case 0:
index 8ce2321369e36f3a09846fd9e145bacc75291447..0b53e3b06666d6ae0522a7be56c578254436bee4 100644 (file)
@@ -32,14 +32,15 @@ static bool test_NetCharDevGetInfo(struct dcerpc_pipe *p, struct torture_context
 {
        NTSTATUS status;
        struct srvsvc_NetCharDevGetInfo r;
+       union srvsvc_NetCharDevInfo info;
        uint32_t levels[] = {0, 1};
        int i;
 
        r.in.server_unc = talloc_asprintf(tctx,"\\\\%s",dcerpc_server_name(p));
        r.in.device_name = devname;
+       r.out.info = &info;
 
        for (i=0;i<ARRAY_SIZE(levels);i++) {
-               ZERO_STRUCT(r.out);
                r.in.level = levels[i];
                torture_comment(tctx, "testing NetCharDevGetInfo level %u on device '%s'\n",
                        r.in.level, r.in.device_name);