Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
6492964
)
Improve API message handler re-registration check
74/8474/2
author
Dave Barach
<
[email protected]
>
Wed, 20 Sep 2017 12:40:16 +0000
(08:40 -0400)
committer
Florin Coras
<
[email protected]
>
Wed, 20 Sep 2017 15:52:47 +0000
(15:52 +0000)
Change-Id: Iedcea2fb45052852666b91a21eed011f5593313d
Signed-off-by: Dave Barach <
[email protected]
>
src/vlibapi/api_shared.c
patch
|
blob
|
history
diff --git
a/src/vlibapi/api_shared.c
b/src/vlibapi/api_shared.c
index
59dc237
..
0c4952b
100644
(file)
--- a/
src/vlibapi/api_shared.c
+++ b/
src/vlibapi/api_shared.c
@@
-671,9
+671,11
@@
vl_msg_api_config (vl_msg_api_msg_config_t * c)
foreach_msg_api_vector;
#undef _
- if (am->msg_names[c->id])
- clib_warning ("BUG: multiple registrations of 'vl_api_%s_t_handler'",
- c->name);
+ if (am->msg_handlers[c->id] && am->msg_handlers[c->id] != c->handler)
+ clib_warning
+ ("BUG: re-registering 'vl_api_%s_t_handler'."
+ "Handler was %llx, replaced by %llx",
+ c->name, am->msg_handlers[c->id], c->handler);
am->msg_names[c->id] = c->name;
am->msg_handlers[c->id] = c->handler;