diff options
author | Ole Troan <ot@cisco.com> | 2020-08-24 12:22:01 +0200 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2020-08-25 07:35:49 +0000 |
commit | bad679291a9dbc4d9274b1697f7ff41283deabd7 (patch) | |
tree | fa1d94b9035af6f34667c60f0b06287966598b98 /src/tools/vppapigen/vppapigen_c.py | |
parent | 3f54d96dac7eda66096ad7068a86fdf4b86cea67 (diff) |
api: register endian handlers for reply messages
Endian handlers was not registered for reply messages.
Causing endian-neutral handlers to crash.
Type: fix
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: Id14173300ee1ab2601e92d58c70d2fa260814b69
Diffstat (limited to 'src/tools/vppapigen/vppapigen_c.py')
-rw-r--r-- | src/tools/vppapigen/vppapigen_c.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tools/vppapigen/vppapigen_c.py b/src/tools/vppapigen/vppapigen_c.py index bf55739094d..59dbbc99fb6 100644 --- a/src/tools/vppapigen/vppapigen_c.py +++ b/src/tools/vppapigen/vppapigen_c.py @@ -644,6 +644,19 @@ def generate_c_boilerplate(services, defines, file_crc, module, stream): ' .is_autoendian = 0}};\n' .format(n=s.caller, ID=s.caller.upper())) write(' vl_msg_api_config (&c);\n') + try: + d = define_hash[s.reply] + write(' c = (vl_msg_api_msg_config_t) {{.id = VL_API_{ID} + msg_id_base,\n' + ' .name = "{n}",\n' + ' .handler = 0,\n' + ' .cleanup = vl_noop_handler,\n' + ' .endian = vl_api_{n}_t_endian,\n' + ' .print = vl_api_{n}_t_print,\n' + ' .is_autoendian = 0}};\n' + .format(n=s.reply, ID=s.reply.upper())) + write(' vl_msg_api_config (&c);\n') + except KeyError: + pass write(' return msg_id_base;\n') write('}\n') |