PATCH rpc server

Gerald Carter jerry at samba.org
Mon Jan 21 20:17:01 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.

I don't think so.  See JF' useless_ptr in the SPOOLSS notify code
(SPOOLSS_RFFPCN and SPOOLSS_RFNPCN)

> So I think it would be equally easy and more reliable for us to send
> the bottom 32 bits of the local pointer value.
>
> If it's already been discovered not to do that then I will just blush
> and crawl back into my cube. ;-)

No discussion as far as I can remember.  Generally 0x0 or 0x1
works fine.  I've not run across a scenario where this does not work.
But then there are a lot of scenarios....








chau, jerry
 ---------------------------------------------------------------------
 Hewlett-Packard                                     http://www.hp.com
 SAMBA Team                                       http://www.samba.org
 --                                            http://www.plainjoe.org
 "Sam's Teach Yourself Samba in 24 Hours" 2ed.      ISBN 0-672-32269-2
 --"I never saved anything for the swim back." Ethan Hawk in Gattaca--





More information about the samba-technical mailing list