diff options
author | Jakub Grajciar <jgrajcia@cisco.com> | 2019-11-14 10:47:25 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2020-01-27 19:21:33 +0000 |
commit | 6f090fa1fa44bb2de0565bbedb2756e37ea35040 (patch) | |
tree | b661976fa07e49f88c98196fe3f6be0e24bf9f96 /extras/libmemif/src/socket.c | |
parent | 37157d52794f7f5774435d7bd524e3f998213a8a (diff) |
libmemif: memif_control_fd_update always pass context from libmemif_main
Event polling instance is always identified by libmemif main private context.
Fixes event polling handled by libmemif.
Type: fix
Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Change-Id: I51dcdb279b18f8ce97bad3b2695848e0b25a232d
Diffstat (limited to 'extras/libmemif/src/socket.c')
-rw-r--r-- | extras/libmemif/src/socket.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/extras/libmemif/src/socket.c b/extras/libmemif/src/socket.c index 2ea6fabc58b..41bb22b570d 100644 --- a/extras/libmemif/src/socket.c +++ b/extras/libmemif/src/socket.c @@ -471,7 +471,7 @@ memif_msg_receive_init (memif_socket_t * ms, int fd, memif_msg_t * msg) error: memif_msg_send_disconnect (fd, err_string, 0); - lm->control_fd_update (fd, MEMIF_FD_EVENT_DEL, c->private_ctx); + lm->control_fd_update (fd, MEMIF_FD_EVENT_DEL, lm->private_ctx); free_list_elt (lm->pending_list, lm->pending_list_len, fd); close (fd); fd = -1; @@ -602,7 +602,7 @@ memif_msg_receive_connect (memif_connection_t * c, memif_msg_t * msg) &lm->interrupt_list_len); lm->control_fd_update (c->rx_queues[i].int_fd, MEMIF_FD_EVENT_READ, - c->private_ctx); + lm->private_ctx); } } @@ -633,7 +633,7 @@ memif_msg_receive_connected (memif_connection_t * c, memif_msg_t * msg) for (i = 0; i < c->run_args.num_s2m_rings; i++) { lm->control_fd_update (c->rx_queues[i].int_fd, MEMIF_FD_EVENT_READ, - c->private_ctx); + lm->private_ctx); } } @@ -892,7 +892,7 @@ memif_conn_fd_accept_ready (memif_socket_t * ms) add_list_elt (lm, &elt, &lm->pending_list, &lm->pending_list_len); lm->control_fd_update (conn_fd, MEMIF_FD_EVENT_READ | MEMIF_FD_EVENT_WRITE, - ms->private_ctx); + lm->private_ctx); return memif_msg_send_hello (lm, conn_fd); } |