diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-09-07 15:34:43 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-09-08 03:35:27 +0200 |
commit | 3d5dd91f598b8661d090ae147ae7c3a8fcea29e0 (patch) | |
tree | 039edc5455c539d3a91079cc1d592bcee088abe6 /pidl | |
parent | a19fd96ab87290cd6ed1c93cd8f83e8697592b21 (diff) | |
download | samba-3d5dd91f598b8661d090ae147ae7c3a8fcea29e0.tar.gz |
pidl: added checking of NDR flags in generated code
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'pidl')
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index 3d31366abf..19c3cc8024 100644 --- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -1332,6 +1332,7 @@ sub ParseStructPush($$$$) $self->start_flags($struct, $ndr); + $self->pidl("NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);"); $self->pidl("if (ndr_flags & NDR_SCALARS) {"); $self->indent; $self->ParseStructPushPrimitives($struct, $ndr, $varname, $env); @@ -1645,6 +1646,7 @@ sub ParseStructPull($$$$) my $env = GenerateStructEnv($struct, $varname); + $self->pidl("NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);"); $self->pidl("if (ndr_flags & NDR_SCALARS) {"); $self->indent; $self->ParseStructPullPrimitives($struct,$ndr,$varname,$env); @@ -1808,6 +1810,7 @@ sub ParseUnionPush($$$$) $self->start_flags($e, $ndr); + $self->pidl("NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);"); $self->pidl("if (ndr_flags & NDR_SCALARS) {"); $self->indent; $self->ParseUnionPushPrimitives($e, $ndr, $varname); @@ -1985,6 +1988,7 @@ sub ParseUnionPull($$$$) $self->pidl("level = ndr_pull_get_switch_value($ndr, $varname);"); + $self->pidl("NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);"); $self->pidl("if (ndr_flags & NDR_SCALARS) {"); $self->indent; $self->ParseUnionPullPrimitives($e,$ndr,$varname,$switch_type); @@ -2267,6 +2271,8 @@ sub ParseFunctionPush($$) $self->DeclareArrayVariables($e); } + $self->pidl("NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);"); + $self->pidl("if (flags & NDR_IN) {"); $self->indent; @@ -2354,6 +2360,8 @@ sub ParseFunctionPull($$) $double_cases{"$e->{NAME}"} = 1; } + $self->pidl("NDR_PULL_CHECK_FN_FLAGS(ndr, flags);"); + $self->pidl("if (flags & NDR_IN) {"); $self->indent; |