scripts: fix app-layer-protos.c setup

After the changes in the script in 05e16820de, the file
app-layer-protos.c was to be modified properly iff it was left unformatted.
However, the file was also formatted as a part of the same commit making
the lines split which broke the output of the script. Fix that by
looking for another pattern and changing the lines following that.
pull/8308/head
Shivani Bhardwaj 3 years ago committed by Victor Julien
parent 23eeba3e35
commit 21edf136a5

@ -146,7 +146,7 @@ def patch_app_layer_protos_c(protoname):
temp = temp.replace("template", protoname.lower())
output.write(temp)
if line.find("return ALPROTO_TEMPLATE;") > -1:
if line.find("strcmp(proto_name, \"template\")") > -1:
# Duplicate the section starting at this line and
# including the following line.
for j in range(i, i + 2):

Loading…
Cancel
Save