if (session_handle_is_local (mp->handle))
{
+ app_worker_t *app_wrk;
+ application_t *app;
ls = application_get_local_session_from_handle (mp->handle);
- if (!ls || ls->app_wrk_index != mp->context)
+ if (!ls)
{
- clib_warning ("server %u doesn't own local handle %llu",
+ clib_warning ("unknown local handle 0x%lx", mp->handle);
+ return;
+ }
+ app_wrk = app_worker_get (ls->app_wrk_index);
+ app = application_get (app_wrk->app_index);
+ if (app->app_index != mp->context)
+ {
+ clib_warning ("server %u doesn't own local handle 0x%lx",
mp->context, mp->handle);
return;
}
{
app_worker_t *app;
app = app_worker_get (s->app_wrk_index);
- application_send_event (app, s, FIFO_EVENT_APP_RX);
+ app_worker_send_event (app, s, FIFO_EVENT_APP_RX);
}
}
}
hdr->data_offset += n_bytes_read;
if (hdr->data_offset == hdr->data_length)
- svm_fifo_dequeue_drop (f, hdr->data_length);
+ {
+ u32 offset = hdr->data_length + SESSION_CONN_HDR_LEN;
+ svm_fifo_dequeue_drop (f, offset);
+ }
}
else
n_bytes_read = svm_fifo_dequeue_nowait (ctx->s->server_tx_fifo,
stream_session_t * s, int *n_tx_pkts)
{
application_t *app;
- app = application_get (s->opaque);
+ app = application_get (s->t_app_index);
svm_fifo_unset_event (s->server_tx_fifo);
return app->cb_fns.builtin_app_tx_callback (s);
}