VPP-990 remove registered handler if control ping fails
[vpp.git] / src / vlibapi / api_shared.c
index 0c4952b..27898c3 100644 (file)
@@ -716,6 +716,18 @@ vl_msg_api_set_handlers (int id, char *name, void *handler, void *cleanup,
   vl_msg_api_config (c);
 }
 
+void
+vl_msg_api_clean_handlers (int msg_id)
+{
+  vl_msg_api_msg_config_t cfg;
+  vl_msg_api_msg_config_t *c = &cfg;
+
+  memset (c, 0, sizeof (*c));
+
+  c->id = msg_id;
+  vl_msg_api_config (c);
+}
+
 void
 vl_msg_api_set_cleanup_handler (int msg_id, void *fp)
 {