r18639: Get rid of the keepref support
authorJelmer Vernooij <jelmer@samba.org>
Mon, 18 Sep 2006 21:52:00 +0000 (21:52 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:18:59 +0000 (14:18 -0500)
(This used to be commit d1364ef0cd8f1a64f44476476323ab390ac4de48)

29 files changed:
source4/gtk/tools/gwcrontab.c
source4/librpc/idl/dcom.idl
source4/librpc/idl/dfs.idl
source4/librpc/idl/drsuapi.idl
source4/librpc/idl/echo.idl
source4/librpc/idl/epmapper.idl
source4/librpc/idl/eventlog.idl
source4/librpc/idl/frsapi.idl
source4/librpc/idl/frsrpc.idl
source4/librpc/idl/initshutdown.idl
source4/librpc/idl/irpc.idl
source4/librpc/idl/lsa.idl
source4/librpc/idl/netlogon.idl
source4/librpc/idl/orpc.idl
source4/librpc/idl/oxidresolver.idl
source4/librpc/idl/remact.idl
source4/librpc/idl/rot.idl
source4/librpc/idl/samr.idl
source4/librpc/idl/spoolss.idl
source4/librpc/idl/srvsvc.idl
source4/librpc/idl/svcctl.idl
source4/librpc/idl/unixinfo.idl
source4/librpc/idl/winreg.idl
source4/librpc/idl/wkssvc.idl
source4/pidl/lib/Parse/Pidl/NDR.pm
source4/pidl/lib/Parse/Pidl/Samba4/Header.pm
source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
source4/torture/rpc/atsvc.c
source4/torture/rpc/oxidresolve.c

index 8826faa100ee4ba08906071b58c6b4daf55df5aa..8f1c56ff764137d6728d55681a5e6bd60b9c8bd7 100644 (file)
@@ -49,7 +49,7 @@ static void update_joblist(void)
        ctr.entries_read = 0;
        ctr.first_entry = NULL;
        r.in.servername = dcerpc_server_name(at_pipe);
-       r.in.ctr = ctr;
+       r.in.ctr = r.out.ctr = &ctr;
     r.in.preferred_max_len = 0xffffffff;
     r.in.resume_handle = r.out.resume_handle = &resume_handle;
        
@@ -59,15 +59,15 @@ static void update_joblist(void)
                return;
        }
 
-               for (i = 0; i < r.out.ctr.entries_read; i++) {
+               for (i = 0; i < r.out.ctr->entries_read; i++) {
                 GtkTreeIter iter;
                 gtk_list_store_append(store_jobs, &iter);
                 gtk_list_store_set (store_jobs, &iter, 
-                       0, r.out.ctr.first_entry[i].flags,
-                       1, r.out.ctr.first_entry[i].job_id, 
-                       2, r.out.ctr.first_entry[i].days_of_week, /*FIXME: Nicer format */
-                       3, r.out.ctr.first_entry[i].job_time, /* FIXME: Nicer format */
-                       4, r.out.ctr.first_entry[i].command,
+                       0, r.out.ctr->first_entry[i].flags,
+                       1, r.out.ctr->first_entry[i].job_id, 
+                       2, r.out.ctr->first_entry[i].days_of_week, /*FIXME: Nicer format */
+                       3, r.out.ctr->first_entry[i].job_time, /* FIXME: Nicer format */
+                       4, r.out.ctr->first_entry[i].command,
                         -1);
 
        }
@@ -122,7 +122,7 @@ void on_new_activate (GtkMenuItem *menuitem, gpointer user_data)
        job.flags = 0; /* FIXME */
        job.command = gtk_entry_get_text(GTK_ENTRY(entry_cmd));
        r.in.servername = dcerpc_server_name(at_pipe);
-       r.in.job_info = job;
+       r.in.job_info = &job;
 
        status = dcerpc_atsvc_JobAdd(at_pipe, mem_ctx, &r);
        if(!NT_STATUS_IS_OK(status)) {
index 13bdde5aa82f678aac58e4c902f6ef9e92d89996..c089cd3c92b6b9f6755822b618fccfd85efa4a4c 100644 (file)
@@ -18,8 +18,7 @@
        object,
        uuid("00000000-0000-0000-C000-000000000046"),
        pointer_default(unique),
-       helpstring("Base interface for all COM interfaces"),
-       keepref
+       helpstring("Base interface for all COM interfaces")
 ]
 interface IUnknown
 {
@@ -43,8 +42,7 @@ interface IUnknown
 [
        object,
        uuid("00000001-0000-0000-C000-000000000046"),
-       pointer_default(unique),
-       keepref
+       pointer_default(unique)
 ] interface IClassFactory : IUnknown
 {
        [local] WERROR CreateInstance([in,unique] MInterfacePointer *pUnknown, 
@@ -71,8 +69,7 @@ interface IUnknown
        uuid("00000131-0000-0000-C000-000000000046"),
        object,
        pointer_default(unique),
-       helpstring("Remote version of IUnknown"),
-       keepref
+       helpstring("Remote version of IUnknown")
 ]
 interface IRemUnknown : IUnknown
 {
@@ -172,8 +169,7 @@ interface IRemUnknown : IUnknown
 [
        object,
        pointer_default(unique),
-       uuid("00000143-0000-0000-C000-000000000046"),
-       keepref
+       uuid("00000143-0000-0000-C000-000000000046")
 ]
 
 interface IRemUnknown2 : IRemUnknown
@@ -190,8 +186,7 @@ interface IRemUnknown2 : IRemUnknown
 [
        object,
        pointer_default(unique),
-       uuid("00020400-0000-0000-C000-000000000046"),
-       keepref
+       uuid("00020400-0000-0000-C000-000000000046")
 ] interface IDispatch : IUnknown
 {
        /*****************/
@@ -259,8 +254,7 @@ interface IRemUnknown2 : IRemUnknown
        uuid(DA23F6DB-6F45-466C-9EED-0B65286F2D78),
        helpstring("ICoffeeMachine Interface"),
        pointer_default(unique),
-       object,
-       keepref
+       object
 ] interface ICoffeeMachine : IUnknown
 {
        WERROR MakeCoffee([in,string,charset(UTF16)] uint16 *flavor);
@@ -278,8 +272,7 @@ interface IRemUnknown2 : IRemUnknown
        object,
        pointer_default(unique),
        uuid("0000000C-0000-0000-C000-000000000046"),
-       helpstring("Stream"),
-       keepref
+       helpstring("Stream")
 ]
 interface IStream : IUnknown
 {
index 42d79d0c81eff73dfb55ab14cf46bdfcf5f6adfc..c79f77cce3d4b9a854cadcf8e861262a855d4ea4 100644 (file)
@@ -5,8 +5,7 @@
 [ uuid("4fc742e0-4a10-11cf-8273-00aa004ae673"),
   version(3.0),
   pointer_default(unique),
-  helpstring("Settings for Microsoft Distributed File System"),
-  keepref
+  helpstring("Settings for Microsoft Distributed File System")
 ] interface netdfs
 {
        /******************/
index f77a5496a0e3cdf24d9a40a03b589829a5ad40e6..aa87676c9d6e400a186ef69c01240e4da2d5ce4d 100644 (file)
@@ -7,8 +7,7 @@
   authservice("ldap"),
   helpstring("Active Directory Replication"),
   pointer_default(unique),
-  depends(security,misc,samr),
-  keepref
+  depends(security,misc,samr)
 ] 
 interface drsuapi
 {
index 80123f992246e2935e4695431848d5f0e2ce2967..fa030be761c8557db970861a9379f37b95e07eaa 100644 (file)
@@ -4,8 +4,7 @@
   endpoint("ncacn_np:[\\pipe\\rpcecho]", "ncacn_ip_tcp:", "ncalrpc:"),
   pointer_default(unique),
   version(1.0),
-  helpstring("Simple echo pipe"),
-  keepref
+  helpstring("Simple echo pipe")
 ]
 interface rpcecho
 {
index e913209cf1c81c8714a22212aedb77d8475e4a2a..223883c366128af712c8b7623a82e3deae8be1d8 100644 (file)
@@ -15,8 +15,7 @@ http://www.opengroup.org/onlinepubs/9629399/chap6.htm#tagcjh_11_02_03_01: bindin
                  "ncalrpc:[EPMAPPER]"),
  helpstring("EndPoint Mapper"),
  pointer_default_top(sptr),
- pointer_default(sptr),
- keepref
+ pointer_default(sptr)
 ]
 interface epmapper
 {
index c8a146b272f5054c50608809846572d1251f734b..38f4a88e281f9ad5b042f6b1a4bd3186af7cfea6 100644 (file)
@@ -7,8 +7,7 @@
   version(0.0),
   depends(lsa,security),
   pointer_default(unique),
-  helpstring("Event Logger"),
-  keepref
+  helpstring("Event Logger")
 ] interface eventlog
 {
        typedef bitmap {
index 579be8c3a699c2e30316543383a72c2612f4e2dc..2c3f3bb9ffa4fb237898586fdd2055231c11de56 100644 (file)
@@ -3,8 +3,7 @@
   version(1.1),
   endpoint("ncacn_ip_tcp:", "ncalrpc:"),
   helpstring("File Replication API"),
-  pointer_default(unique),
-  keepref
+  pointer_default(unique)
 ] 
 interface frsapi
 {
index 3fe5e6db2292ddffc83f7c45d688286b404de9b9..434c5d490dd746bbaa1d37c8b989b77ec321ca0f 100644 (file)
@@ -3,8 +3,7 @@
   version(1.1),
   endpoint("ncacn_ip_tcp:", "ncalrpc:"),
   helpstring("File Replication Service"),
-  pointer_default(unique),
-  keepref
+  pointer_default(unique)
 ] 
 interface frsrpc
 {
index 8555ed0c5cd33a57f292bdd237e1074b7b436d6e..50d49637c2e65d87234c022b902fe6888afbcbef 100644 (file)
@@ -9,8 +9,7 @@
   version(1.0),
   endpoint("ncacn_np:[\\pipe\\InitShutdown]"),
   pointer_default(unique),
-  helpstring("Init shutdown service"),
-  keepref
+  helpstring("Init shutdown service")
 ] interface initshutdown
 {
        typedef struct {
index a566a99bfc9c4013f4642cb520212222acf3b56d..5614608bd75f78f7fad6e51f65485114d57339b6 100644 (file)
@@ -6,8 +6,7 @@
 [ uuid("e770c620-0b06-4b5e-8d87-a26e20f28340"),
   version(1.0),
   pointer_default(unique),
-  depends(security,nbt),
-  keepref
+  depends(security,nbt)
 ] interface irpc
 {
        typedef bitmap {
index f78c36ec59d00154a23b8f1469f2dff3cb16060c..1e941e6f3bd49e85a14046a47682977f262da853 100644 (file)
@@ -9,8 +9,7 @@
   endpoint("ncacn_np:[\\pipe\\lsarpc]","ncacn_np:[\\pipe\\netlogon]","ncacn_np:[\\pipe\\lsass]", "ncacn_ip_tcp:", "ncalrpc:"),
   pointer_default(unique),
   helpstring("Local Security Authority"),
-  depends(security),
-  keepref
+  depends(security)
 ] interface lsarpc
 {
        declare bitmap security_secinfo;
index e406d51329f48da6a957012710356c7684fef32e..ffceab002d7784348490482e4c81f8c729bb16e5 100644 (file)
@@ -12,8 +12,7 @@
   endpoint("ncacn_np:[\\pipe\\netlogon]","ncacn_ip_tcp:","ncalrpc:"),
   pointer_default(unique),
   pointer_default_top(unique),
-  depends(lsa,samr,security),
-  keepref
+  depends(lsa,samr,security)
 ]
 
 interface netlogon
index c59cc9d3cb4c4573d160a360f6bacf3b8928c1f9..c1faefd3b1777c5c5bf0b0e0e4d5f9504e312858 100644 (file)
@@ -6,8 +6,7 @@
  */
 
 [
-       pointer_default(unique),
-       keepref
+       pointer_default(unique)
 ]
 interface ObjectRpcBaseTypes
 {
index beeb6a7f4f471d98c9000298de736e58c7c3a19c..12c5947265b320880767c2542d504b7d8274b601 100644 (file)
@@ -16,8 +16,7 @@
        endpoint("ncacn_np:[\\pipe\\epmapper]", "ncacn_ip_tcp:[135]", "ncalrpc:"),
        pointer_default(unique),
        pointer_default_top(unique),
-       depends(dcom, orpc),
-       keepref
+       depends(dcom, orpc)
 ]
 interface IOXIDResolver
 {
@@ -34,8 +33,8 @@ interface IOXIDResolver
                 [in] uint16 cRequestedProtseqs,
                 [in, size_is(cRequestedProtseqs)] uint16 arRequestedProtseqs[],
                 [out] DUALSTRINGARRAY *ppdsaOxidBindings,
-                [out] IPID pipidRemUnknown,
-                [out] uint32 pAuthnHint
+                [out,ref] IPID *pipidRemUnknown,
+                [out,ref] uint32 *pAuthnHint
                         );
 
        /* Simple ping is used to ping a Set. Client machines use this */
@@ -51,8 +50,7 @@ interface IOXIDResolver
        /* whole set can subsequently be pinged using SimplePing, */
        /* thus reducing network traffic. */
        [idempotent] WERROR ComplexPing (
-               [in] SETID *SetId, /* In of 0 on first call for new set. */
-               [out] SETID SetId,
+               [in,out,ref] SETID *SetId, /* In of 0 on first call for new set. */
                [in] uint16 SequenceNum,
                [in] uint16 cAddToSet,
                [in] uint16 cDelFromSet,
@@ -60,7 +58,7 @@ interface IOXIDResolver
                [in, size_is(cAddToSet)] OID AddToSet[],
                /*remove these OIDs from the set */
                [in, size_is(cDelFromSet)] OID DelFromSet[],
-               [out] uint16 PingBackoffFactor/* 2^factor = multipler */
+               [out,ref] uint16 *PingBackoffFactor/* 2^factor = multipler */
                         );
 
        /* In some cases the client maybe unsure that a particular */
@@ -80,9 +78,9 @@ interface IOXIDResolver
                                                                                          [in] uint16 cRequestedProtseqs,
                                                                                          [in, size_is(cRequestedProtseqs)] uint16 arRequestedProtseqs[],
                                                                                          [out] DUALSTRINGARRAY *pdsaOxidBindings,
-                                                                                         [out] IPID ipidRemUnknown,
-                                                                                         [out] uint32 AuthnHint,
-                                                                                         [out] COMVERSION ComVersion
+                                                                                         [out,ref] IPID *ipidRemUnknown,
+                                                                                         [out,ref] uint32 *AuthnHint,
+                                                                                         [out,ref] COMVERSION *ComVersion
                                                                                         );
        typedef struct {
                COMVERSION version;
@@ -90,7 +88,7 @@ interface IOXIDResolver
        } COMINFO;
 
        [idempotent] WERROR ServerAlive2 (
-         [out] COMINFO info,
-         [out] DUALSTRINGARRAY dualstring,
+         [out,ref] COMINFO *info,
+         [out,ref] DUALSTRINGARRAY *dualstring,
          [out] uint8 unknown2[3]);
 }
index 2f8baf926ae0961d18fffea24b78850975231d88..16ac5f60c1f93c888b0647fa71a90ca110b64e7c 100644 (file)
@@ -8,8 +8,7 @@
        pointer_default(unique),
        pointer_default_top(unique),
        endpoint("ncalrpc:", "ncacn_ip_tcp:[135]", "ncacn_np:[\\pipe\\epmapper]"),
-       depends(dcom,orpc),
-       keepref
+       depends(dcom,orpc)
 ]
 interface IRemoteActivation
 {
@@ -25,7 +24,7 @@ interface IRemoteActivation
        const uint32 MODE_GET_CLASS_OBJECT = 0xffffffff;
        WERROR RemoteActivation (
                        [in] ORPCTHIS this,
-                       [out] ORPCTHAT that,
+                       [out,ref] ORPCTHAT *that,
                        [in] GUID Clsid,
                        [in] [string,charset(UTF16)] uint16 *pwszObjectName,
                        [in] MInterfacePointer *pObjectStorage,
@@ -35,12 +34,12 @@ interface IRemoteActivation
                        [in,size_is(Interfaces)] GUID *pIIDs,
                        [in] uint16 num_protseqs,
                        [in, size_is(num_protseqs)] uint16 protseq[*],
-                       [out] hyper pOxid,
-                       [out] DUALSTRINGARRAY *pdsaOxidBindings,
-                       [out] GUID ipidRemUnknown,
-                       [out] uint32 AuthnHint,
-                       [out] COMVERSION ServerVersion,
-                       [out] WERROR hr,
+                       [out,ref] hyper *pOxid,
+                       [out,ref] DUALSTRINGARRAY *pdsaOxidBindings,
+                       [out,ref] GUID *ipidRemUnknown,
+                       [out,ref] uint32 *AuthnHint,
+                       [out,ref] COMVERSION *ServerVersion,
+                       [out,ref] WERROR *hr,
                        [out,size_is(Interfaces)] MInterfacePointer *ifaces[],
                        [out,size_is(Interfaces)] WERROR results[]
                        );
index 27c78366356d96f669a53d86df7ee7e1ae374a6e..abc210aa35eead2da6226d469fc0c7e309a8ac4b 100644 (file)
@@ -5,15 +5,14 @@
        pointer_default_top(unique),
        depends(orpc),
        endpoint("ncacn_np:[\\pipe\\epmapper]", "ncacn_ip_tcp:[135]", 
-                 "ncalrpc:[EPMAPPER]"),
-       keepref
+                 "ncalrpc:[EPMAPPER]")
 ] interface rot
 {
        WERROR rot_add (
                                        [in] uint32 flags, 
                                        [in] MInterfacePointer *unk, 
                                        [in] MInterfacePointer *moniker, 
-                                       [out] uint32 rotid
+                                       [out,ref] uint32 *rotid
                                        );
        
        WERROR rot_remove (
@@ -26,7 +25,7 @@
        
        WERROR rot_get_interface_pointer (
                                         [in] MInterfacePointer *moniker, 
-                                        [out] MInterfacePointer *ip
+                                        [out,ref] MInterfacePointer *ip
                                         );
        
        WERROR rot_set_modification_time (
@@ -36,7 +35,7 @@
        
        WERROR rot_get_modification_time (
                                                           [in] MInterfacePointer *moniker,
-                                                          [out] NTTIME t
+                                                          [out,ref] NTTIME *t
                                                           );
        
        WERROR rot_enum (
index a3470ef78c049459aa1e1c7b9de57f4ebae02cc3..0f67b3d5fe2a37ade13fee1732248e5b444befa3 100644 (file)
@@ -13,8 +13,7 @@
   endpoint("ncacn_np:[\\pipe\\samr]","ncacn_ip_tcp:", "ncalrpc:"),
   pointer_default(unique),
   pointer_default_top(unique),
-  depends(misc,lsa,security),
-  keepref
+  depends(misc,lsa,security)
 ] interface samr
 {
        declare bitmap security_secinfo;
index 02e6ff3f37ea197895f4de54173e1a93e3980cb0..3e900c95cee63cc820bf0053df8a093e4e1b9347 100644 (file)
@@ -11,8 +11,7 @@
   pointer_default_top(unique),
   helpstring("Spooler SubSystem"),
   depends(security),
-  helper("librpc/ndr/ndr_spoolss_buf.h"),
-  keepref
+  helper("librpc/ndr/ndr_spoolss_buf.h")
 ] interface spoolss
 {
        typedef struct {
index 2ebd98fa31030d4ea4311b712188a6e7ce12e66b..b62a3827d157a591216274fd0935c8ad307da7b9 100644 (file)
@@ -10,8 +10,7 @@
   pointer_default(unique),
   pointer_default_top(unique),
   helpstring("Server Service"),
-  depends(security,svcctl),
-  keepref
+  depends(security,svcctl)
 ] interface srvsvc
 {
        declare bitmap svcctl_ServerType;
index 97460217f5f10c583cb6d9f9b4ed182a4111e18d..57d25efd0db36106385c79cc5a62359c052b8a39 100644 (file)
@@ -9,8 +9,7 @@
   pointer_default(unique),
   pointer_default_top(unique),
   endpoint("ncacn_np:[\\pipe\\svcctl]", "ncalrpc:"),
-  helpstring("Service Control"),
-  keepref
+  helpstring("Service Control")
 ] interface svcctl
 {
        typedef struct {
index 086cfc748633ce7b5b087c5e3779a63e78570679..4b12a3056ac63fb950b1d12050d8661fa3b737ed 100644 (file)
@@ -8,8 +8,7 @@
   endpoint("ncacn_np:[\\pipe\\unixinfo]", "ncacn_ip_tcp:", "ncalrpc:"),
   pointer_default(unique),
   helpstring("Unixinfo specific stuff"),
-  depends(security),
-  keepref
+  depends(security)
 ] interface unixinfo
 {
        /******************/
index 04521304e79d210455866ec4ceed9b19e706130d..03b034b38f7bd0dfb5a40d7cae4aa84bd9d1bed0 100644 (file)
@@ -9,8 +9,7 @@
   pointer_default(unique),
   pointer_default_top(unique),
   helpstring("Remote Registry Service"),
-  depends(lsa,initshutdown,security),
-  keepref
+  depends(lsa,initshutdown,security)
 ] interface winreg
 {
        declare bitmap security_secinfo;
index a085265a41481dd8bd5415494a78065a12c24361..d658091c4769a3099ae86eab429068ec1864e041 100644 (file)
@@ -7,8 +7,7 @@
   pointer_default(unique),
   pointer_default_top(unique),
   helpstring("Workstation Service"),
-  depends(srvsvc),
-  keepref
+  depends(srvsvc)
 ] interface wkssvc
 {
        declare [v1_enum] enum srvsvc_PlatformId;
index f602bd2d68225f1083bdc9fd8fdbbd1ebd1713f6..cd8aa214ffb16e4cce14be9e485bd0469f714e09 100644 (file)
@@ -586,23 +586,6 @@ sub CheckPointerTypes($$)
        }
 }
 
-#FIXME: Remove when ref handling in Samba4 is fixed
-sub AddKeepRef($)
-{
-       my $d = shift;
-
-       if ($d->{TYPE} eq "FUNCTION") {
-               foreach (@{$d->{ELEMENTS}}) {
-                       $_->{PROPERTIES}->{keepref} = 1;
-               }
-       } elsif ($d->{TYPE} eq "TYPEDEF" and ($d->{DATA}->{TYPE} eq "STRUCT"
-                       or $d->{DATA}->{TYPE} eq "UNION")) {
-               foreach (@{$d->{DATA}->{ELEMENTS}}) {
-                       $_->{PROPERTIES}->{keepref} = 1;
-               }
-       }
-}
-
 sub ParseInterface($)
 {
        my $idl = shift;
@@ -628,12 +611,10 @@ sub ParseInterface($)
                if ($d->{TYPE} eq "DECLARE") {
                        push (@declares, $d);
                } elsif ($d->{TYPE} eq "FUNCTION") {
-                       AddKeepRef($d) if (has_property($idl, "keepref"));
                        push (@functions, ParseFunction($idl, $d, \$opnum));
                } elsif ($d->{TYPE} eq "CONST") {
                        push (@consts, ParseConst($idl, $d));
                } else {
-                       AddKeepRef($d) if (has_property($idl, "keepref"));
                        push (@types, ParseType($idl, $d));
                }
        }
@@ -855,10 +836,6 @@ my %property_list = (
        "noheader"              => ["ELEMENT"],
        "charset"               => ["ELEMENT"],
        "length_is"             => ["ELEMENT"],
-
-       # temporary (should be removed once we've migrated away from 
-       # relying on ref pointers being there in Samba4's code)
-       "keepref"               => ["ELEMENT","INTERFACE"],
 );
 
 #####################################################################
index c9487115f5aec8bc8b8350500225783c0bc6b904..6fb3ee2eecb826ee65a9df590fc263c8e24ec269 100644 (file)
@@ -60,11 +60,7 @@ sub HeaderElement($)
        } else {
                HeaderType($element, $element->{TYPE}, "");
                pidl " ";
-               my $numstar = 0;
-               if (!has_property($element, "ref") or 
-                       has_property($element, "keepref")) {
-                       $numstar += $element->{POINTERS};
-               }
+               my $numstar = $element->{POINTERS};
                if ($numstar >= 1) {
                        $numstar-- if Parse::Pidl::Typelist::scalar_is_reference($element->{TYPE});
                }
index bbcc9f884e54e4e3e71e73e4f63dfaa0d917f024..6124935e67f789f62b2add8284929a28a3de6ffb 100644 (file)
@@ -593,9 +593,7 @@ sub ParseElementPushLevel
                                pidl "NDR_CHECK(ndr_push_relative_ptr2(ndr, $var_name));";
                        }
                }
-               if ($l->{POINTER_TYPE} ne "ref" or has_property($e, "keepref")) {
-                       $var_name = get_value_of($var_name);
-               }
+               $var_name = get_value_of($var_name);
                ParseElementPushLevel($e, GetNextLevel($e, $l), $ndr, $var_name, $env, 1, 1);
 
                if ($l->{POINTER_TYPE} ne "ref") {
@@ -675,9 +673,7 @@ sub ParsePtrPush($$$)
        my ($e,$l,$var_name) = @_;
 
        if ($l->{POINTER_TYPE} eq "ref") {
-               if (has_property($e, "keepref")) {
-                       check_null_pointer(get_value_of($var_name));
-               }
+               check_null_pointer(get_value_of($var_name));
                if ($l->{LEVEL} eq "EMBEDDED") {
                        pidl "NDR_CHECK(ndr_push_ref_ptr(ndr));";
                }
@@ -713,15 +709,13 @@ sub ParseElementPrint($$$)
 
        foreach my $l (@{$e->{LEVELS}}) {
                if ($l->{TYPE} eq "POINTER") {
-                       if ($l->{POINTER_TYPE} ne "ref" or has_property($e, "keepref")) {
                        pidl "ndr_print_ptr(ndr, \"$e->{NAME}\", $var_name);";
                        pidl "ndr->depth++;";
-                               if ($l->{POINTER_TYPE} ne "ref") {
-                                       pidl "if ($var_name) {";
-                                       indent;
-                               }
-                               $var_name = get_value_of($var_name);
+                       if ($l->{POINTER_TYPE} ne "ref") {
+                               pidl "if ($var_name) {";
+                               indent;
                        }
+                       $var_name = get_value_of($var_name);
                } elsif ($l->{TYPE} eq "ARRAY") {
                        my $length;
 
@@ -770,13 +764,11 @@ sub ParseElementPrint($$$)
 
        foreach my $l (reverse @{$e->{LEVELS}}) {
                if ($l->{TYPE} eq "POINTER") {
-                       if ($l->{POINTER_TYPE} ne "ref" or has_property($e, "keepref")) {
-                               if ($l->{POINTER_TYPE} ne "ref") {
-                                       deindent;
-                                       pidl "}";
-                               }
-                               pidl "ndr->depth--;";
+                       if ($l->{POINTER_TYPE} ne "ref") {
+                               deindent;
+                               pidl "}";
                        }
+                       pidl "ndr->depth--;";
                } elsif (($l->{TYPE} eq "ARRAY")
                        and not is_charset_array($e,$l)
                        and not has_fast_array($e,$l)) {
@@ -890,7 +882,7 @@ sub ParseMemCtxPullStart($$$)
                my $next_is_array = ($nl->{TYPE} eq "ARRAY");
                my $next_is_string = (($nl->{TYPE} eq "DATA") and 
                                        ($nl->{DATA_TYPE} eq "string"));
-               if ($next_is_array or $next_is_string or not has_property($e, "keepref")) {
+               if ($next_is_array or $next_is_string) {
                        return;
                } else {
                        $mem_c_flags = "LIBNDR_FLAG_REF_ALLOC";
@@ -916,7 +908,7 @@ sub ParseMemCtxPullEnd($$)
                my $next_is_array = ($nl->{TYPE} eq "ARRAY");
                my $next_is_string = (($nl->{TYPE} eq "DATA") and 
                                        ($nl->{DATA_TYPE} eq "string"));
-               if ($next_is_array or $next_is_string or not has_property($e, "keepref")) {
+               if ($next_is_array or $next_is_string) {
                        return;
                } else {
                        $mem_r_flags = "LIBNDR_FLAG_REF_ALLOC";
@@ -993,9 +985,7 @@ sub ParseElementPullLevel
 
                ParseMemCtxPullStart($e,$l, $var_name);
 
-               if ($l->{POINTER_TYPE} ne "ref" or has_property($e, "keepref")) {
-                       $var_name = get_value_of($var_name);
-               }
+               $var_name = get_value_of($var_name);
                ParseElementPullLevel($e,GetNextLevel($e,$l), $ndr, $var_name, $env, 1, 1);
 
                ParseMemCtxPullEnd($e,$l);
@@ -1099,8 +1089,7 @@ sub ParsePtrPull($$$$)
                        pidl "NDR_CHECK(ndr_pull_ref_ptr($ndr, &_ptr_$e->{NAME}));";
                }
 
-               if (!$next_is_array and !$next_is_string and 
-                       has_property($e, "keepref")) {
+               if (!$next_is_array and !$next_is_string) {
                        pidl "if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {";
                        pidl "\tNDR_PULL_ALLOC($ndr, $var_name);"; 
                        pidl "}";
@@ -1445,7 +1434,7 @@ sub need_decl_mem_ctx($$)
                my $next_is_array = ($nl->{TYPE} eq "ARRAY");
                my $next_is_string = (($nl->{TYPE} eq "DATA") and 
                                        ($nl->{DATA_TYPE} eq "string"));
-               return 0 if ($next_is_array or $next_is_string or not has_property($e, "keepref"));
+               return 0 if ($next_is_array or $next_is_string);
        }
        return 1 if ($l->{TYPE} eq "POINTER");
 
@@ -2111,7 +2100,6 @@ sub ParseFunctionPull($)
                next unless (grep(/out/, @{$e->{DIRECTION}}));
                next unless ($e->{LEVELS}[0]->{TYPE} eq "POINTER" and 
                             $e->{LEVELS}[0]->{POINTER_TYPE} eq "ref");
-               next unless has_property($e, "keepref");
                next if (($e->{LEVELS}[1]->{TYPE} eq "DATA") and 
                                 ($e->{LEVELS}[1]->{DATA_TYPE} eq "string"));
                next if (($e->{LEVELS}[1]->{TYPE} eq "ARRAY") 
index c1357b53d24fe7bf2b31f04e8908f7e3ebd86e7a..e586a1e98f8d42eed76c651557afe1d34c0121fe 100644 (file)
@@ -75,7 +75,7 @@ static BOOL test_JobEnum(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
        r.in.servername = dcerpc_server_name(p);
        ctr.entries_read = 0;
        ctr.first_entry = NULL;
-       r.in.ctr = ctr;
+       r.in.ctr = r.out.ctr = &ctr;
        r.in.preferred_max_len = 0xffffffff;
        r.in.resume_handle = r.out.resume_handle = &resume_handle;
 
@@ -86,8 +86,8 @@ static BOOL test_JobEnum(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
                return False;
        }
 
-       for (i = 0; i < r.out.ctr.entries_read; i++) {
-               if (!test_JobGetInfo(p, mem_ctx, r.out.ctr.first_entry[i].job_id)) {
+       for (i = 0; i < r.out.ctr->entries_read; i++) {
+               if (!test_JobGetInfo(p, mem_ctx, r.out.ctr->first_entry[i].job_id)) {
                        ret = False;
                }
        }
@@ -109,7 +109,7 @@ static BOOL test_JobAdd(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
        info.days_of_week = 0x02;   /* Tuesday */
        info.flags = 0x11;          /* periodic, non-interactive */
        info.command = "foo.exe";
-       r.in.job_info = info;
+       r.in.job_info = &info;
 
        status = dcerpc_atsvc_JobAdd(p, mem_ctx, &r);
 
index 11ec5f27490fd6469eab55e9fa7d72c31e6a70b6..3643a854857d9a560c8fa16538252572730f7f69 100644 (file)
@@ -47,6 +47,8 @@ static int test_RemoteActivation(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uin
        r.in.Interfaces = 1;
        iids[0] = dcerpc_table_IUnknown.syntax_id.uuid;
        r.in.pIIDs = iids;
+       r.out.pOxid = oxid;
+       r.out.ipidRemUnknown = oid;
 
        status = dcerpc_RemoteActivation(p, mem_ctx, &r);
        if(NT_STATUS_IS_ERR(status)) {
@@ -60,7 +62,7 @@ static int test_RemoteActivation(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uin
        }
 
        if(!W_ERROR_IS_OK(r.out.hr)) {
-               fprintf(stderr, "RemoteActivation: %s\n", win_errstr(r.out.hr));
+               fprintf(stderr, "RemoteActivation: %s\n", win_errstr(*r.out.hr));
                return 0;
        }
 
@@ -69,8 +71,6 @@ static int test_RemoteActivation(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uin
                return 0;
        }
 
-       *oid = r.out.ipidRemUnknown;
-       *oxid = r.out.pOxid;
 
        return 1;
 }
@@ -189,7 +189,7 @@ static int test_ResolveOxid2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint64_
                return 0;
        }
        
-       printf("Remote server versions: %d, %d\n", r.out.ComVersion.MajorVersion, r.out.ComVersion.MinorVersion);
+       printf("Remote server versions: %d, %d\n", r.out.ComVersion->MajorVersion, r.out.ComVersion->MinorVersion);
 
        return 1;
 }