Fixed issues from code review
diff --git a/c_gen/c_type_maps.py b/c_gen/c_type_maps.py
index 33ca149..9644fdb 100644
--- a/c_gen/c_type_maps.py
+++ b/c_gen/c_type_maps.py
@@ -1036,7 +1036,7 @@
of_message_stats_type_set(msg, type);
}
if ((type = of_object_to_error_type(id, ver)) >= 0) {
- /* It's a stats obj */
+ /* It's an error obj */
of_message_error_type_set(msg, type);
}
if ((type = of_object_to_flow_mod_command(id, ver)) >= 0) {
diff --git a/py_gen/templates/message.py b/py_gen/templates/message.py
index 1b2ad3f..c8e31c9 100644
--- a/py_gen/templates/message.py
+++ b/py_gen/templates/message.py
@@ -129,7 +129,7 @@
if err_type in error_msg_parsers:
return error_msg_parsers[err_type](buf)
else:
- raise loxi.ProtocolError("unexpected error type %u" % stats_type)
+ raise loxi.ProtocolError("unexpected error type %u" % err_type)
def parse_flow_mod(buf):
:: if version == 1: