From 75d2cc1cabf886f4bbe38817340c4f95a2793c16 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sat, 20 Aug 2005 11:42:11 +0000 Subject: r9424: Remove duplicate interface name in DCERPC subdissector strings. Also shorten some of the autogenerated function names. (This used to be commit f380e86806aca0aa5159fc3ad1f4bdf633375c86) --- source4/build/pidl/Parse/Pidl/Ethereal/NDR.pm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'source4/build') diff --git a/source4/build/pidl/Parse/Pidl/Ethereal/NDR.pm b/source4/build/pidl/Parse/Pidl/Ethereal/NDR.pm index 6ca40e3496..73dd34096e 100644 --- a/source4/build/pidl/Parse/Pidl/Ethereal/NDR.pm +++ b/source4/build/pidl/Parse/Pidl/Ethereal/NDR.pm @@ -344,9 +344,12 @@ sub Function($$$) $dissectornames{$_->{NAME}} = Element($_, $fn->{NAME}, $ifname) } + my $fn_name = $_->{NAME}; + $fn_name =~ s/^${ifname}_//; + PrintIdl DumpFunction($fn->{ORIGINAL}); pidl_code "static int"; - pidl_code "$ifname\_dissect\_$fn->{NAME}_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)"; + pidl_code "$ifname\_dissect\_${fn_name}_response(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)"; pidl_code "{"; indent; foreach (@{$fn->{ELEMENTS}}) { @@ -369,7 +372,7 @@ sub Function($$$) pidl_code "}\n"; pidl_code "static int"; - pidl_code "$ifname\_dissect\_$fn->{NAME}_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)"; + pidl_code "$ifname\_dissect\_${fn_name}_request(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_)"; pidl_code "{"; indent; foreach (@{$fn->{ELEMENTS}}) { @@ -826,10 +829,11 @@ sub DumpFunctionTable($) my $if = shift; my $res = "static dcerpc_sub_dissector $if->{NAME}\_dissectors[] = {\n"; - foreach (@{$if->{FUNCTIONS}}) { - $res.= "\t{ $_->{OPNUM}, \"$_->{NAME}\",\n"; - $res.= "\t $if->{NAME}_dissect_$_->{NAME}_request, $if->{NAME}_dissect_$_->{NAME}_response},\n"; + my $fn_name = $_->{NAME}; + $fn_name =~ s/^$if->{NAME}_//; + $res.= "\t{ $_->{OPNUM}, \"$fn_name\",\n"; + $res.= "\t $if->{NAME}_dissect_${fn_name}_request, $if->{NAME}_dissect_${fn_name}_response},\n"; } $res .= "\t{ 0, NULL, NULL, NULL }\n"; -- cgit