session: fix session formated str output truncated in cli
[vpp.git] / src / vnet / session / session.c
index d6a531e..0571218 100644 (file)
@@ -347,16 +347,15 @@ void
 session_half_open_delete_notify (transport_connection_t *tc)
 {
   /* Notification from ctrl thread accepted without rpc */
-  if (tc->thread_index <= 1)
+  if (!tc->thread_index)
     {
       session_half_open_free (ho_session_get (tc->s_index));
     }
   else
     {
       void *args = uword_to_pointer ((uword) tc->s_index, void *);
-      u32 ctrl_thread = vlib_num_workers () ? 1 : 0;
-      session_send_rpc_evt_to_thread (ctrl_thread, session_half_open_free_rpc,
-                                     args);
+      session_send_rpc_evt_to_thread_force (0, session_half_open_free_rpc,
+                                           args);
     }
 }
 
@@ -1288,8 +1287,6 @@ session_dgram_accept (transport_connection_t * tc, u32 listener_index,
       return rv;
     }
 
-  s->session_state = SESSION_STATE_READY;
-
   return 0;
 }
 
@@ -1900,9 +1897,9 @@ session_node_enable_disable (u8 is_en)
       if (i == 0 && n_vlibs > 1)
        {
          vlib_node_set_state (vm, session_queue_node.index, mstate);
-         session_main_get_worker (0)->state = SESSION_WRK_INTERRUPT;
          if (is_en)
            {
+             session_main_get_worker (0)->state = SESSION_WRK_INTERRUPT;
              vlib_node_set_state (vm, session_queue_process_node.index,
                                   state);
              n = vlib_get_node (vm, session_queue_process_node.index);
@@ -1966,7 +1963,7 @@ session_main_init (vlib_main_t * vm)
   smm->evt_qs_segment_size = 1 << 20;
 #endif
 
-  smm->last_transport_proto_type = TRANSPORT_PROTO_DTLS;
+  smm->last_transport_proto_type = TRANSPORT_PROTO_SRTP;
 
   return 0;
 }