fix generation of legacy type maps for message superclasses
My commit 4db4d043 changed the contents of the message_types dictionary to
include all message classes, including subclasses of stats and flow mods. The
old handcoded type maps did not include the subclasses. The change caused the
generated C of_message_type_to_id tables to be incorrect.
This change removes the subclasses from the generated message_types dictionary.
diff --git a/loxigen.py b/loxigen.py
index bfa4909..3a22a12 100755
--- a/loxigen.py
+++ b/loxigen.py
@@ -519,7 +519,8 @@
continue
subcls = cls[3:]
val = find_type_value(ofclass, 'type')
- type_maps.message_types[wire_version][subcls] = val
+ if not val in type_maps.message_types[wire_version].values():
+ type_maps.message_types[wire_version][subcls] = val
# Extensions
experimenter = find_experimenter('of', cls)