session: app-closed to transport-deleted on delete notify 47/23247/2
authorFlorin Coras <fcoras@cisco.com>
Fri, 25 Oct 2019 23:23:39 +0000 (16:23 -0700)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Fri, 15 Nov 2019 07:15:44 +0000 (07:15 +0000)
Type: refactor

As a result, transport-deleted is the only session state that has no
transport data structure.

Change-Id: I2da2bc4bbb141d8a7b52faae66a4733de8f8513b
Signed-off-by: Florin Coras <fcoras@cisco.com>
(cherry picked from commit 3b5e222f8a4d0ccd4ec4eace2551491f13de85d9)

src/vnet/session/session.c
src/vnet/session/session_types.h

index 14cd1f6..55f6bfb 100644 (file)
@@ -887,7 +887,7 @@ session_transport_delete_notify (transport_connection_t * tc)
        * session is just removed because both transport and app have
        * confirmed the close*/
       session_lookup_del_session (s);
-      s->session_state = SESSION_STATE_CLOSED;
+      s->session_state = SESSION_STATE_TRANSPORT_DELETED;
       session_cleanup_notify (s, SESSION_CLEANUP_TRANSPORT);
       svm_fifo_dequeue_drop_all (s->tx_fifo);
       session_program_transport_ctrl_evt (s, SESSION_CTRL_EVT_CLOSE);
index f4bb24e..fde1e10 100644 (file)
@@ -133,8 +133,8 @@ typedef enum
   _(CLOSING, "closing")                                        \
   _(APP_CLOSED, "app-closed")                          \
   _(TRANSPORT_CLOSED, "transport-closed")              \
-  _(TRANSPORT_DELETED, "transport-deleted")            \
   _(CLOSED, "closed")                                  \
+  _(TRANSPORT_DELETED, "transport-deleted")            \
 
 typedef enum
 {