summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-12-08 22:40:36 +0000
committerTim Potter <tpot@samba.org>2001-12-08 22:40:36 +0000
commitae02ee94e9c1ea9074829d57d02ab3d9b5b1b218 (patch)
treec4629c9123c2704d48ce3b41f149e6d4bb4521e9
parentae87ee3ccd33e56519974cea6adc60fa752229b1 (diff)
downloadsamba-ae02ee94e9c1ea9074829d57d02ab3d9b5b1b218.tar.gz
samba-ae02ee94e9c1ea9074829d57d02ab3d9b5b1b218.tar.bz2
samba-ae02ee94e9c1ea9074829d57d02ab3d9b5b1b218.zip
Convert a bunch of "prs_foo()" to "offset = prs_foo()"
Return offset from function request and response code. (This used to be commit 83ada5447b05667800dec536ac71d4b7437c77e4)
-rw-r--r--source4/build/pidl/eparser.pm16
1 files changed, 8 insertions, 8 deletions
diff --git a/source4/build/pidl/eparser.pm b/source4/build/pidl/eparser.pm
index 791d8ee05b..ba49b39f18 100644
--- a/source4/build/pidl/eparser.pm
+++ b/source4/build/pidl/eparser.pm
@@ -67,14 +67,14 @@ sub ParseArray($)
$res .= "\tfor (i = 0; i < count; i++) {\n";
if (is_scalar_type($elt)) {
- $res .= "\t\tprs_$elt->{NAME}(tvb, offset, pinfo, tree, \"$elt->{NAME});\n";
+ $res .= "\t\toffset = prs_$elt->{TYPE}(tvb, offset, pinfo, tree, \"$elt->{NAME});\n";
$res .= "\t}\n\n";
} else {
- $res .= "\t\tprs_$elt->{NAME}(tvb, offset, pinfo, tree, \"PARSE_SCALARS\", \"$elt->{NAME}\");\n";
+ $res .= "\t\toffset = prs_$elt->{TYPE}(tvb, offset, pinfo, tree, \"PARSE_SCALARS\", \"$elt->{NAME}\");\n";
$res .= "\t}\n\n";
$res .= "\tfor (i = 0; i < count; i++) {\n";
- $res .= "\t\tprs_$elt->{NAME}(tvb, offset, pinfo, tree, \"PARSE_BUFFERS\", \"$elt->{NAME}\");\n";
+ $res .= "\t\toffset = prs_$elt->{TYPE}(tvb, offset, pinfo, tree, \"PARSE_BUFFERS\", \"$elt->{NAME}\");\n";
$res .= "\t}\n\n";
}
}
@@ -100,13 +100,13 @@ sub ParseElement($$)
# Pointers are scalars
if ($elt->{POINTERS}) {
- $res .= "\t\tptr_$elt->{NAME} = prs_ptr(tvb, offset, pinfo, tree, \"$elt->{NAME}\");\n";
+ $res .= "\t\toffset = prs_ptr(tvb, offset, pinfo, tree, &ptr_$elt->{NAME}, \"$elt->{NAME}\");\n";
} else {
# Simple type are scalars too
if (is_scalar_type($elt->{TYPE})) {
- $res .= "\t\tprs_$elt->{TYPE}(tvb, offset, pinfo, tree, \"$elt->{NAME}}\");\n\n";
+ $res .= "\t\toffset = prs_$elt->{TYPE}(tvb, offset, pinfo, tree, \"$elt->{NAME}}\");\n\n";
}
}
@@ -127,7 +127,7 @@ sub ParseElement($$)
if (has_property($elt->{PROPERTIES}, "size_is")) {
ParseArray($elt);
} else {
- $res .= "\t\tprs_$elt->{TYPE}(tvb, offset, pinfo, tree, flags, \"$elt->{NAME}\");\n\n";
+ $res .= "\t\toffset = prs_$elt->{TYPE}(tvb, offset, pinfo, tree, flags, \"$elt->{NAME}\");\n\n";
}
if ($elt->{POINTERS}) {
@@ -252,7 +252,7 @@ sub ParseFunction($)
ParseFunctionArg($arg, "in");
}
- $res .= "\n\treturn 0;\n}\n\n";
+ $res .= "\n\treturn offset;\n}\n\n";
# Output function
@@ -265,7 +265,7 @@ sub ParseFunction($)
$res .= "\n\toffset = prs_ntstatus(tvb, offset, pinfo, tree);\n";
- $res .= "\n\treturn 0;\n}\n\n";
+ $res .= "\n\treturn offset;\n}\n\n";
}