aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rwxr-xr-xsrc/vnet/session/session_api.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index e82be560b1f..56593865381 100755
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -278,30 +278,6 @@ send_session_accept_callback (stream_session_t * s)
return 0;
}
-void
-mq_send_local_session_disconnected_cb (u32 app_wrk_index,
- local_session_t * ls)
-{
- app_worker_t *app_wrk = app_worker_get (app_wrk_index);
- svm_msg_q_msg_t _msg, *msg = &_msg;
- session_disconnected_msg_t *mp;
- svm_msg_q_t *app_mq;
- session_event_t *evt;
- application_t *app;
-
- app = application_get (app_wrk->app_index);
- app_mq = app_wrk->event_queue;
- svm_msg_q_lock_and_alloc_msg_w_ring (app_mq, SESSION_MQ_CTRL_EVT_RING,
- SVM_Q_WAIT, msg);
- evt = svm_msg_q_msg_data (app_mq, msg);
- memset (evt, 0, sizeof (*evt));
- evt->event_type = SESSION_CTRL_EVT_DISCONNECTED;
- mp = (session_disconnected_msg_t *) evt->data;
- mp->handle = application_local_session_handle (ls);
- mp->context = app->api_client_index;
- svm_msg_q_add_and_unlock (app_mq, msg);
-}
-
static void
send_session_disconnect_callback (stream_session_t * s)
{
@@ -551,6 +527,30 @@ mq_send_session_disconnected_cb (stream_session_t * s)
svm_msg_q_add_and_unlock (app_mq, msg);
}
+void
+mq_send_local_session_disconnected_cb (u32 app_wrk_index,
+ local_session_t * ls)
+{
+ app_worker_t *app_wrk = app_worker_get (app_wrk_index);
+ svm_msg_q_msg_t _msg, *msg = &_msg;
+ session_disconnected_msg_t *mp;
+ svm_msg_q_t *app_mq;
+ session_event_t *evt;
+ application_t *app;
+
+ app = application_get (app_wrk->app_index);
+ app_mq = app_wrk->event_queue;
+ if (mq_try_lock_and_alloc_msg (app_mq, msg))
+ return;
+ evt = svm_msg_q_msg_data (app_mq, msg);
+ memset (evt, 0, sizeof (*evt));
+ evt->event_type = SESSION_CTRL_EVT_DISCONNECTED;
+ mp = (session_disconnected_msg_t *) evt->data;
+ mp->handle = application_local_session_handle (ls);
+ mp->context = app->api_client_index;
+ svm_msg_q_add_and_unlock (app_mq, msg);
+}
+
static void
mq_send_session_reset_cb (stream_session_t * s)
{