summaryrefslogtreecommitdiffstats
path: root/src/vlibmemory/vlib_api.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-12-06 17:05:08 -0800
committerDave Barach <openvpp@barachs.net>2019-12-09 15:50:02 +0000
commit5224b5cbd51ed48d1d2ce2a412998d8a944c480b (patch)
tree470bd8dda83ecb91f251f563e721acee306a6dec /src/vlibmemory/vlib_api.c
parent4505f0154eaba59c432c869b65e2dc493837032a (diff)
api: fix sock reg passing on read event
Type: fix Change-Id: I383242e04a114b69fe247d912842be3560e96c10 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vlibmemory/vlib_api.c')
-rw-r--r--src/vlibmemory/vlib_api.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/vlibmemory/vlib_api.c b/src/vlibmemory/vlib_api.c
index 05652fa2244..5494da3d1fb 100644
--- a/src/vlibmemory/vlib_api.c
+++ b/src/vlibmemory/vlib_api.c
@@ -385,10 +385,16 @@ vl_api_clnt_process (vlib_main_t * vm, vlib_node_runtime_t * node,
case SOCKET_READ_EVENT:
for (i = 0; i < vec_len (event_data); i++)
{
+ vl_api_registration_t *regp;
+
a = pool_elt_at_index (socket_main.process_args, event_data[i]);
- vl_socket_process_api_msg (a->clib_file, a->regp,
- (i8 *) a->data);
- a = pool_elt_at_index (socket_main.process_args, event_data[i]);
+ regp = vl_socket_get_registration (a->reg_index);
+ if (regp)
+ {
+ vl_socket_process_api_msg (regp, (i8 *) a->data);
+ a = pool_elt_at_index (socket_main.process_args,
+ event_data[i]);
+ }
vec_free (a->data);
pool_put (socket_main.process_args, a);
}