Gerald Carter gcarter at valinux.com
Thu Aug 10 12:54:16 GMT 2000

Sander Striker wrote:
> Hmmm, does it happen often that pieces of 0 memory are first
> reserved and later realloc()'ed to something bigger?
> If this is the case and it happens a lot in marshalling I
> should maybe do a little optimization on the sma code in TNG;
> return NULL when 0 bytes are requested instead of returning
> a block off the minimal size returned by sma. Would this be
> preferred behaviour?

I've been dealing only with HEAD and only client side calls
(thus only unmarshalling the data).  The problem showed up
when unmarshalling a structure in which some of the UNISTR's
were empty.  In my case, the Print Monitor Name was empty, followed
by a default datatype of "RAW".

The buffer for monitorname and defaultdatatype both pointed
to the unmarshalled UNISTR "RAW"

   /\  Gerald (Jerry) Carter                     Professional Services
 \/    http://www.valinux.com  VA Linux Systems    gcarter at valinux.com
       http://www.samba.org       SAMBA Team           jerry at samba.org

       "...a hundred billion castaways looking for a home."
                                - Sting "Message in a Bottle" ( 1979 )

More information about the samba-technical mailing list