summaryrefslogtreecommitdiff
path: root/pidl/lib/Parse
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@suse.de>2011-11-13 20:39:58 +0100
committerJeremy Allison <jra@samba.org>2012-01-13 09:37:37 -0800
commit6501b8bc6f6f7cd83f67c9766abc8231caf7fe54 (patch)
tree98ed62cde7458e0727800616f27898eb9c3e5c7a /pidl/lib/Parse
parent2fd4be0085332753ddbd59b2bc841da9a4d0cdce (diff)
downloadsamba-6501b8bc6f6f7cd83f67c9766abc8231caf7fe54.tar.gz
samba-6501b8bc6f6f7cd83f67c9766abc8231caf7fe54.tar.bz2
samba-6501b8bc6f6f7cd83f67c9766abc8231caf7fe54.zip
idl: add parser for the to_null property
Compile into a ndr_pull_charset_to_null call. Signed-off-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'pidl/lib/Parse')
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index 6073ff8181..16ed685cb2 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -1068,7 +1068,11 @@ sub ParseElementPullLevel
if ($l->{IS_ZERO_TERMINATED}) {
$self->CheckStringTerminator($ndr, $e, $l, $length);
}
- $self->pidl("NDR_CHECK(ndr_pull_charset($ndr, $ndr_flags, ".get_pointer_to($var_name).", $length, sizeof(" . mapTypeName($nl->{DATA_TYPE}) . "), CH_$e->{PROPERTIES}->{charset}));");
+ if ($l->{IS_TO_NULL}) {
+ $self->pidl("NDR_CHECK(ndr_pull_charset_to_null($ndr, $ndr_flags, ".get_pointer_to($var_name).", $length, sizeof(" . mapTypeName($nl->{DATA_TYPE}) . "), CH_$e->{PROPERTIES}->{charset}));");
+ } else {
+ $self->pidl("NDR_CHECK(ndr_pull_charset($ndr, $ndr_flags, ".get_pointer_to($var_name).", $length, sizeof(" . mapTypeName($nl->{DATA_TYPE}) . "), CH_$e->{PROPERTIES}->{charset}));");
+ }
return;
} elsif (has_fast_array($e, $l)) {
if ($l->{IS_ZERO_TERMINATED}) {