IDL variable sized array of arrays problem

Amin Azez azez at
Mon Jan 14 11:46:15 GMT 2008

This may be an IDL bug or a misunderstanding in my own mind. It's not
holding me up, but I thought I'd mention it for interest:

This IDL:

    void proxy_Read(
        [in] uint32 fnum,  /* file number as supplied by remote device */
        [in] uint32 offset,
        [in] uint32 mincnt,
        [in] uint32 maxcnt,
        [in,out,ref] uint16 *flags, /* read_for_execute, zlib, md5 etc */
        [in] uint16 digest_count,
        [in] [size_is(digest_count)] uint[8] digest[16][],
        [out] uint32 *nread,
        [out] [size_is(*nread)] uint8 data[]
fails on:
        [in] [size_is(digest_count)] uint[8] digest[16][],
  Compiling librpc/gen_ndr/ndr_proxy.c
  librpc/gen_ndr/ndr_proxy.c: In function ‘ndr_pull_proxy_Read’:
  librpc/gen_ndr/ndr_proxy.c:61: error: cast specifies array type

line 61 says:
  NDR_PULL_ALLOC_N(ndr, r->in.digest, ndr_get_array_size(ndr,

 (admittedly that array structure was not a ideal, I was just getting
something working):

This works:
        [in] [size_is(digest_count)] digest digest[],
        [out] uint32 *nread,
        [out] [size_is(*nread)] uint8 data[]
    typedef struct digest {
        uint8 data[16];
    } digest;


More information about the samba-technical mailing list