X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fsession%2Fsession.c;h=6492ce7089e993abf750629cf4b2d7750cab34bb;hb=refs%2Fchanges%2F91%2F16591%2F4;hp=4081f90948200ff51953a2cc3218906fdec51391;hpb=8d6f34e2b1cbfde5702e88686631527d5e1e10a0;p=vpp.git diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c index 4081f909482..6492ce7089e 100644 --- a/src/vnet/session/session.c +++ b/src/vnet/session/session.c @@ -829,6 +829,24 @@ stream_session_delete_notify (transport_connection_t * tc) } } +/** + * Notification from transport that session can be closed + * + * Should be called by transport only if it was closed with non-empty + * tx fifo and once it decides to begin the closing procedure prior to + * issuing a delete notify. This gives the chance to the session layer + * to cleanup any outstanding events. + */ +void +session_stream_close_notify (transport_connection_t * tc) +{ + stream_session_t *s; + + if (!(s = session_get_if_valid (tc->s_index, tc->thread_index))) + return; + s->session_state = SESSION_STATE_CLOSED; +} + /** * Notify application that connection has been reset. */