aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-12-16 16:45:48 +0100
committerHarald Welte <laforge@gnumonks.org>2015-12-16 16:45:48 +0100
commita0c74240fa6457d77bc367284760fe2240ec1f5f (patch)
tree9b73950efb0ab5168013e62e7e9df42b9469069b /asn1
parent1c4d4bc23375cf44213b3093df2a48848bf5827a (diff)
asn1tostruct: Avoid erroneous double-underscores
We shouldn't generate names like RANAP_RAB_SetupList_EnhancedRelocCompleteReq__t when creating the _encode() and _decode() functiosn, as the '-IEs' at the end must be stripped before converting all '-' to '_'.
Diffstat (limited to 'asn1')
-rwxr-xr-xasn1/utils/asn1tostruct.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/asn1/utils/asn1tostruct.py b/asn1/utils/asn1tostruct.py
index 92fc074..61d0f68 100755
--- a/asn1/utils/asn1tostruct.py
+++ b/asn1/utils/asn1tostruct.py
@@ -270,7 +270,7 @@ for key in iesDefs:
if key in ieofielist.values():
continue
structName = re.sub('ies', '', key)
- asn1cStruct = re.sub('-', '_', re.sub('IEs', '', key))
+ asn1cStruct = re.sub('-', '_', re.sub('IEs', '', re.sub('-IEs', '', key)))
ielistname = re.sub('UE', 'ue', asn1cStruct)
ielistnamefirstlower = ielistname[:1].lower() + ielistname[1:]
asn1cStructfirstlower = asn1cStruct[:1].lower() + asn1cStruct[1:]
@@ -392,7 +392,7 @@ for key in iesDefs:
continue
structName = re.sub('ies', '', key)
- asn1cStruct = re.sub('-', '_', re.sub('IEs', '', key))
+ asn1cStruct = re.sub('-', '_', re.sub('IEs', '', re.sub('-IEs', '', key)))
firstwordlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
asn1cStruct = prefix + re.sub('Item', 'List', asn1cStruct)
asn1cStructfirstlower = asn1cStruct[:1].lower() + asn1cStruct[1:]