PATCH rpc server

Jean Francois Micouleau Jean-Francois.Micouleau at dalalu.fr
Mon Jan 21 23:30:02 GMT 2002


On Tue, 22 Jan 2002, Martin Pool wrote:

> On 22 Jan 2002, Tim Potter <tpot at samba.org> wrote:
>
> > When the structure is unmarshalled and the pointer is zero, set the
> > struct foo *bar to NULL.  When marshalling, if struct foo *bar is NULL
> > then write out a zero pointer, else write out a one (or 0xdeadbeef
> > (-:).
>
> I agree with Tim about removing the ptr_ members, but not about
> marshalling them as 0xfeedb0b0.
>
> I wouldn't be surprised the NT unmarshalling code does actually
> implement the NDR spec for nonunique pointers: if the same opaque
> value is passed for two different pointers then they're meant to be
> combined into a pointer to the same object on the server, and the
> referent of the pointer is only marshalled once.

then that would be a known fact by most of us ;-)

yes NT does implement non unique ptrs, on the paper at least, never
verified the wire version.

But for the common pipes that samba implements, they don't use non unique
ptrs

> So I think it would be equally easy and more reliable for us to send
> the bottom 32 bits of the local pointer value.

putting a well defined value for ptr is useful when you debug from on wire
traces, you can compare more easily and find alignment errors.


	J.F.






More information about the samba-technical mailing list