Module: kamailio
Branch: master
Commit: 35114a416d46015a8282094d9e6f7f93d15eb23d
URL:
https://github.com/kamailio/kamailio/commit/35114a416d46015a8282094d9e6f7f9…
Author: Richard Good <richard.good(a)smilecoms.com>
Committer: Richard Good <richard.good(a)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/35114a416d46015a8282094d9e6f7f9…
Patch:
https://github.com/kamailio/kamailio/commit/35114a416d46015a8282094d9e6f7f9…
---
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);