X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvpp%2Fapi%2Fapi.c;h=6fe779cec2afc4a9f663a5820633bad927af71d3;hb=43428dbfbbd8b37a519cb59f254f7b8ec257c983;hp=01527a565f386fa087ec93871897f87b26e31eb6;hpb=2dbee9361e74d03727a8b618ba80a5e28c006011;p=vpp.git diff --git a/src/vpp/api/api.c b/src/vpp/api/api.c index 01527a565f3..6fe779cec2a 100644 --- a/src/vpp/api/api.c +++ b/src/vpp/api/api.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include @@ -61,6 +60,7 @@ #include #include +#include #define vl_typedefs /* define message structures */ #include @@ -221,11 +221,12 @@ vl_api_cli_inband_t_handler (vl_api_cli_inband_t * mp) goto error; } - cmd_vec = vl_api_from_api_to_new_vec (&mp->cmd); + cmd_vec = vl_api_from_api_to_new_vec (mp, &mp->cmd); unformat_init_string (&input, (char *) cmd_vec, vl_api_string_len (&mp->cmd)); rv = vlib_cli_input (vm, &input, inband_cli_output, (uword) & out_vec); + unformat_free (&input); error: /* *INDENT-OFF* */ @@ -342,7 +343,7 @@ vl_api_get_node_index_t_handler (vl_api_get_node_index_t * mp) /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_GET_NODE_INDEX_REPLY, ({ - rmp->node_index = ntohl(node_index); + rmp->node_index = htonl(node_index); })); /* *INDENT-ON* */ } @@ -389,7 +390,7 @@ out: /* *INDENT-OFF* */ REPLY_MACRO2(VL_API_GET_NEXT_INDEX_REPLY, ({ - rmp->next_index = ntohl(next_index); + rmp->next_index = htonl(next_index); })); /* *INDENT-ON* */ } @@ -420,9 +421,9 @@ vl_api_add_node_next_t_handler (vl_api_add_node_next_t * mp) out: /* *INDENT-OFF* */ - REPLY_MACRO2(VL_API_GET_NODE_INDEX_REPLY, + REPLY_MACRO2(VL_API_ADD_NODE_NEXT_REPLY, ({ - rmp->next_index = ntohl(next_index); + rmp->next_index = htonl(next_index); })); /* *INDENT-ON* */ } @@ -582,7 +583,7 @@ static void vl_api_##nn##_t_handler ( \ svm_queue_t * q; \ \ /* One registration only... */ \ - pool_foreach(reg, vam->nn##_registrations, \ + pool_foreach (reg, vam->nn##_registrations) \ ({ \ q = vl_api_client_index_to_input_queue (reg->client_index); \ if (q) { \