[sr-dev] git:master:35114a41: modules/cdp: Added ability to receive TIMEOUT event while in IDLE state to authstatemachine to avoid stale sessions
Richard Good
richard.good at smilecoms.com
Tue Sep 13 12:41:54 CEST 2016
Module: kamailio
Branch: master
Commit: 35114a416d46015a8282094d9e6f7f93d15eb23d
URL: https://github.com/kamailio/kamailio/commit/35114a416d46015a8282094d9e6f7f93d15eb23d
Author: Richard Good <richard.good at smilecoms.com>
Committer: Richard Good <richard.good at smilecoms.com>
Date: 2016-09-13T12:40:15+02:00
modules/cdp: Added ability to receive TIMEOUT event while in IDLE state to authstatemachine to avoid stale sessions
---
Modified: modules/cdp/authstatemachine.c
---
Diff: https://github.com/kamailio/kamailio/commit/35114a416d46015a8282094d9e6f7f93d15eb23d.diff
Patch: https://github.com/kamailio/kamailio/commit/35114a416d46015a8282094d9e6f7f93d15eb23d.patch
---
diff --git a/modules/cdp/authstatemachine.c b/modules/cdp/authstatemachine.c
index 203dfef..eaefb0b 100644
--- a/modules/cdp/authstatemachine.c
+++ b/modules/cdp/authstatemachine.c
@@ -290,6 +290,15 @@ int auth_client_statefull_sm_process(cdp_session_t* s, int event, AAAMessage* ms
//LM_INFO("state machine: i was in idle and i am going to pending\n");
break;
+
+ /* Just in case we have some lost sessions */
+ case AUTH_EV_SESSION_TIMEOUT:
+ case AUTH_EV_SESSION_GRACE_TIMEOUT:
+ LM_ERR("auth_client_statefull_sm_process(): Received TIMEOUT - clean up session to avoid stale sessions\n");
+ cdp_session_cleanup(s, msg);
+ s = 0;
+ break;
+
default:
LM_ERR("auth_client_statefull_sm_process(): Received invalid event %d while in state %s!(data %p)\n",
event, auth_states[x->state], x->generic_data);
More information about the sr-dev
mailing list