diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2017-01-27 08:57:40 +0100 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2017-01-27 19:53:59 +0000 |
commit | 4746a5d75ebb080d15d5d743dca3a85d0265176f (patch) | |
tree | 1b3d9f6ddbeed9a9b561cb688afbf67c73c9f34c /src/vpp-api/java/jvpp-core | |
parent | 32e1c010b0c34fd0984f7fc45fae648a182025c5 (diff) |
jvpp: utilize per-message CRCs (VPP-544)
Since messages ids are no longer statically referenced,
fixes also VPP-611.
Change-Id: Ic8e6ee2b7f1142c185595347984d69350be25ac3
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'src/vpp-api/java/jvpp-core')
-rw-r--r-- | src/vpp-api/java/jvpp-core/jvpp_core.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/vpp-api/java/jvpp-core/jvpp_core.c b/src/vpp-api/java/jvpp-core/jvpp_core.c index ef4cb8e3e7e..c04666b2952 100644 --- a/src/vpp-api/java/jvpp-core/jvpp_core.c +++ b/src/vpp-api/java/jvpp-core/jvpp_core.c @@ -67,8 +67,14 @@ JNIEXPORT void JNICALL Java_io_fd_vpp_jvpp_core_JVppCoreImpl_init0 plugin_main->callbackObject = (*env)->NewGlobalRef(env, callback); plugin_main->callbackClass = (jclass)(*env)->NewGlobalRef(env, (*env)->GetObjectClass(env, callback)); + // verify API has not changed since jar generation + #define _(N) \ + get_message_id(env, #N); \ + foreach_supported_api_message; + #undef _ + #define _(N,n) \ - vl_msg_api_set_handlers(VL_API_##N, #n, \ + vl_msg_api_set_handlers(get_message_id(env, #N), #n, \ vl_api_##n##_t_handler, \ vl_noop_handler, \ vl_noop_handler, \ |