Module: kamailio
Branch: master
Commit: cddcf1daa0c3747c12ed54734c1c91c0e7deefd6
URL:
https://github.com/kamailio/kamailio/commit/cddcf1daa0c3747c12ed54734c1c91c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2016-07-06T16:27:08+02:00
dialog: pass info on cseq update tracking via cfg environment
---
Modified: modules/dialog/dialog.c
---
Diff:
https://github.com/kamailio/kamailio/commit/cddcf1daa0c3747c12ed54734c1c91c…
Patch:
https://github.com/kamailio/kamailio/commit/cddcf1daa0c3747c12ed54734c1c91c…
---
diff --git a/modules/dialog/dialog.c b/modules/dialog/dialog.c
index e781708..9e9581c 100644
--- a/modules/dialog/dialog.c
+++ b/modules/dialog/dialog.c
@@ -66,6 +66,7 @@
#include "../../parser/parse_to.h"
#include "../../modules/tm/tm_load.h"
#include "../../rpc_lookup.h"
+#include "../../srapi.h"
#include "../rr/api.h"
#include "dlg_hash.h"
#include "dlg_timer.h"
@@ -461,6 +462,7 @@ static int pv_get_dlg_count(struct sip_msg *msg, pv_param_t *param,
static int mod_init(void)
{
unsigned int n;
+ sr_cfgenv_t *cenv = NULL;
if(dlg_ka_interval!=0 && dlg_ka_interval<30) {
LM_ERR("ka interval too low (%d), has to be at least 30\n",
@@ -512,7 +514,7 @@ static int mod_init(void)
}
if (timeout_spec.s) {
- if ( pv_parse_spec(&timeout_spec, &timeout_avp)==0
+ if ( pv_parse_spec(&timeout_spec, &timeout_avp)==0
&& (timeout_avp.type!=PVT_AVP)){
LM_ERR("malformed or non AVP timeout "
"AVP definition in '%.*s'\n", timeout_spec.len,timeout_spec.s);
@@ -704,8 +706,11 @@ static int mod_init(void)
/* timer process to clean old unconfirmed dialogs */
register_sync_timers(1);
- if(_dlg_track_cseq_updates!=0)
+ if(_dlg_track_cseq_updates!=0) {
+ cenv = sr_cfgenv_get();
+ cenv->cseq_update = 1;
dlg_register_cseq_callbacks();
+ }
return 0;
}