svn commit: samba r1845 - in branches/SAMBA_4_0/source: build/pidl librpc/rpc

Stefan (metze) Metzmacher metze at samba.org
Wed Aug 18 06:11:08 GMT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

tridge at samba.org schrieb:
| I suppose the trouble really started when I overloaded the single
| NTSTATUS return value to mean two things. Maybe we should look at that
| again? It sure is ugly that we treat RPC functions that return
| NTSTATUS specially, and in quite a different fashion from functions
| that return WERROR or other error types.

I would propose the following patch, and the calling function should always look at
r.out.result .

Index: build/pidl/client.pm
===================================================================
- --- build/pidl/client.pm        (revision 1871)
+++ build/pidl/client.pm        (working copy)
@@ -35,12 +35,7 @@
~         if (NT_STATUS_IS_OK(status) && (p->flags & DCERPC_DEBUG_PRINT_OUT)) {
~                NDR_PRINT_OUT_DEBUG($name, r);
~        }
- -";
- -        if ($fn->{RETURN_TYPE} eq "NTSTATUS") {
- -             $res .= "\tif (NT_STATUS_IS_OK(status)) status = r->out.result;\n"
- -        }
- -       $res .=
- -"
+
~        return status;
~ }
~ ";


- --
metze

Stefan Metzmacher <metze at samba.org> www.samba.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3-nr1 (Windows XP)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBIvL8m70gjA5TCD8RAkPCAJsH4P93nw0c4bi9ucF3HDEaT/BFDwCfa6Zw
nV2JeVJQdxe4uYdb457AAsk=
=9+7H
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list