summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2005-08-20 11:42:11 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:33:38 -0500
commit75d2cc1cabf886f4bbe38817340c4f95a2793c16 (patch)
treeea5af74a263e67db68b299a43765b4c3005a5c44 /source4/build
parent00b06c014d5fb6e2b5ed8341a139a2e7b41eca6c (diff)
downloadsamba-75d2cc1cabf886f4bbe38817340c4f95a2793c16.tar.gz
samba-75d2cc1cabf886f4bbe38817340c4f95a2793c16.tar.bz2
samba-75d2cc1cabf886f4bbe38817340c4f95a2793c16.zip
r9424: Remove duplicate interface name in DCERPC subdissector strings. Also
shorten some of the autogenerated function names. (This used to be commit f380e86806aca0aa5159fc3ad1f4bdf633375c86)
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/pidl/Parse/Pidl/Ethereal/NDR.pm14
1 files changed, 9 insertions, 5 deletions
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";