1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-29 04:23:51 +03:00

r1133: - add ndr_pull_ptr() as a separate call instead of ndr_pull_uint32()

(useful for debugging IDL)

- fixed a couple of places that auto-generate incorrect printf style arguments
  for ndr_pull_error()
This commit is contained in:
Andrew Tridgell
2004-06-14 07:27:22 +00:00
committed by Gerald (Jerry) Carter
parent f0940f1912
commit ad3324a79c
2 changed files with 13 additions and 3 deletions

View File

@@ -448,7 +448,7 @@ sub ParseElementPullSwitch($$$$)
} else {
pidl "\t\tif (_level != $switch_var) {\n";
}
pidl "\t\t\treturn ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, \"Bad switch value %u in $e->{NAME}\");\t\t}\n";
pidl "\t\t\treturn ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, \"Bad switch value %u in $e->{NAME}\", _level);\t\t}\n";
if ($switch_var =~ /r->/) {
pidl "else { $switch_var = _level; }\n";
}
@@ -524,7 +524,7 @@ sub ParseElementPullScalar($$$)
} elsif (util::is_inline_array($e)) {
ParseArrayPull($e, "r->", "NDR_SCALARS");
} elsif (util::need_wire_pointer($e)) {
pidl "\tNDR_CHECK(ndr_pull_uint32(ndr, &_ptr_$e->{NAME}));\n";
pidl "\tNDR_CHECK(ndr_pull_ptr(ndr, &_ptr_$e->{NAME}));\n";
pidl "\tif (_ptr_$e->{NAME}) {\n";
pidl "\t\tNDR_ALLOC(ndr, $var_prefix$e->{NAME});\n";
pidl "\t} else {\n";
@@ -1209,7 +1209,7 @@ sub ParseFunctionElementPull($$)
if (util::array_size($e)) {
if (util::need_wire_pointer($e)) {
pidl "\tNDR_CHECK(ndr_pull_uint32(ndr, &_ptr_$e->{NAME}));\n";
pidl "\tNDR_CHECK(ndr_pull_ptr(ndr, &_ptr_$e->{NAME}));\n";
pidl "\tif (_ptr_$e->{NAME}) {\n";
} elsif ($inout eq "out" && util::has_property($e, "ref")) {
pidl "\tif (r->$inout.$e->{NAME}) {\n";