From 6501b8bc6f6f7cd83f67c9766abc8231caf7fe54 Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Sun, 13 Nov 2011 20:39:58 +0100 Subject: idl: add parser for the to_null property Compile into a ndr_pull_charset_to_null call. Signed-off-by: Jeremy Allison --- pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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}) { -- cgit