session: call session_dequeue_notify after svm_fifo_dequeue_drop
Type: fix
dequeue_notify callback at app-layer needs to know available space in fifo,
so, session_dequeue_notify should be called after svm_fifo_dequeue_drop
@@ -453,11 +453,14 @@ u32
session_tx_fifo_dequeue_drop (transport_connection_t * tc, u32 max_bytes)
{
session_t *s = session_get (tc->s_index, tc->thread_index);
+ u32 rv;
+
+ rv = svm_fifo_dequeue_drop (s->tx_fifo, max_bytes);
if (svm_fifo_needs_tx_ntf (s->tx_fifo, max_bytes))
session_dequeue_notify (s);
- return svm_fifo_dequeue_drop (s->tx_fifo, max_bytes);
+ return rv;
}
static inline int
