pidl:Samba3/ServerNDR: correctly initialise ndr_push struct
[ira/wip.git] / pidl / lib / Parse / Pidl / Samba3 / ServerNDR.pm
index 0ebccf552cb185fefb2b78e3db538ad3253e42c7..64a4ec5aedeed19ab7112110755766d21e691bda 100644 (file)
@@ -199,6 +199,12 @@ sub ParseFunction($$)
        pidl "\treturn false;";
        pidl "}";
        pidl "";
+       pidl "/*";
+       pidl " * carry over the pointer count to the reply in case we are";
+       pidl " * using full pointer. See NDR specification for full pointers";
+       pidl " */";
+       pidl "push->ptr_count = pull->ptr_count;";
+       pidl "";
        pidl "ndr_err = call->ndr_push(push, NDR_OUT, r);";
        pidl "if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {";
        pidl "\ttalloc_free(r);";