pidl: handle hyper attribute for wireshark
[kai/samba-autobuild/.git] / pidl / lib / Parse / Pidl / Samba3 / ServerNDR.pm
index 1cbf1876015bb96eb4e05880c6e540cd10ff2a53..c4374baf7c577fc5aa569817ccacb108203aba57 100644 (file)
@@ -190,7 +190,7 @@ sub ParseFunction($$)
        pidl "}";
        pidl "";
        pidl "if (DEBUGLEVEL >= 10) {";
-       pidl "\nNDR_PRINT_FUNCTION_DEBUG($fn->{NAME}, NDR_OUT | NDR_SET_VALUES, r);";
+       pidl "\tNDR_PRINT_FUNCTION_DEBUG($fn->{NAME}, NDR_OUT | NDR_SET_VALUES, r);";
        pidl "}";
        pidl "";
        pidl "push = ndr_push_init_ctx(r);";
@@ -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);";
@@ -288,6 +294,7 @@ sub Parse($$$)
        pidl " */";
        pidl "";
        pidl "#include \"includes.h\"";
+       pidl "#include \"ntdomain.h\"";
        pidl "#include \"$header\"";
        pidl_hdr "#include \"$ndr_header\"";
        pidl "";