session: add support for proxying apps
[vpp.git] / src / vnet / session / session.c
index 7f28a39..c214b81 100644 (file)
@@ -490,7 +490,7 @@ session_enqueue_notify (stream_session_t * s, u8 block)
 
   /* *INDENT-OFF* */
   SESSION_EVT_DBG(SESSION_EVT_ENQ, s, ({
-      ed->data[0] = evt.event_id;
+      ed->data[0] = evt.event_type;
       ed->data[1] = svm_fifo_max_dequeue (s->server_rx_fifo);
   }));
   /* *INDENT-ON* */
@@ -581,7 +581,7 @@ session_stream_connect_notify (transport_connection_t * tc, u8 is_fail)
   if (!is_fail)
     {
       sm = application_get_connect_segment_manager (app);
-      alloc_fifos = application_is_proxy (app);
+      alloc_fifos = !application_is_builtin_proxy (app);
       if (session_alloc_and_init (sm, tc, alloc_fifos, &new_s))
        {
          is_fail = 1;
@@ -1008,7 +1008,7 @@ session_type_from_proto_and_ip (transport_proto_t proto, u8 is_ip4)
 transport_connection_t *
 session_get_transport (stream_session_t * s)
 {
-  if (s->session_state >= SESSION_STATE_READY)
+  if (s->session_state != SESSION_STATE_LISTENING)
     return tp_vfts[s->session_type].get_connection (s->connection_index,
                                                    s->thread_index);
   return 0;