Localize the timeout variable within the W message macro.
[vpp.git] / src / plugins / flowperpkt / flowperpkt_test.c
index 9211ebe..4cc1cfb 100644 (file)
@@ -19,6 +19,8 @@
 #include <vlibmemory/api.h>
 #include <vlibsocket/api.h>
 #include <vppinfra/error.h>
+
+#define __plugin_msg_base flowperpkt_test_main.msg_id_base
 #include <vlibapi/vat_helper_macros.h>
 
 /**
@@ -93,7 +95,6 @@ static int
 api_flowperpkt_tx_interface_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
-  f64 timeout;
   int enable_disable = 1;
   u8 which = 0;                        /* ipv4 by default */
   u32 sw_if_index = ~0;
@@ -121,13 +122,13 @@ api_flowperpkt_tx_interface_add_del (vat_main_t * vam)
     }
 
   /* Construct the API message */
-  M (FLOWPERPKT_TX_INTERFACE_ADD_DEL, flowperpkt_tx_interface_add_del);
+  M (FLOWPERPKT_TX_INTERFACE_ADD_DEL, mp);
   mp->sw_if_index = ntohl (sw_if_index);
   mp->is_add = enable_disable;
   mp->which = which;
 
   /* send it... */
-  S;
+  S (mp);
 
   /* Wait for a reply... */
   W;