summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application_worker.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session/application_worker.c')
-rw-r--r--src/vnet/session/application_worker.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/vnet/session/application_worker.c b/src/vnet/session/application_worker.c
index a8edad3edbb..dd1088e2cbb 100644
--- a/src/vnet/session/application_worker.c
+++ b/src/vnet/session/application_worker.c
@@ -369,21 +369,12 @@ app_worker_own_session (app_worker_t * app_wrk, session_t * s)
if (app_worker_alloc_session_fifos (sm, s))
return -1;
- if (!svm_fifo_is_empty (rxf))
- {
- clib_memcpy_fast (s->rx_fifo->data, rxf->data, rxf->nitems);
- s->rx_fifo->head = rxf->head;
- s->rx_fifo->tail = rxf->tail;
- s->rx_fifo->cursize = rxf->cursize;
- }
+ if (!svm_fifo_is_empty_cons (rxf))
+ svm_fifo_clone (s->rx_fifo, rxf);
+
+ if (!svm_fifo_is_empty_cons (txf))
+ svm_fifo_clone (s->tx_fifo, txf);
- if (!svm_fifo_is_empty (txf))
- {
- clib_memcpy_fast (s->tx_fifo->data, txf->data, txf->nitems);
- s->tx_fifo->head = txf->head;
- s->tx_fifo->tail = txf->tail;
- s->tx_fifo->cursize = txf->cursize;
- }
segment_manager_dealloc_fifos (rxf, txf);