Module: sip-router
Branch: master
Commit: 5c5b587d44a46b3a4d48c7e7926c42a44cd4d8c8
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5c5b587…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Apr 17 15:49:36 2014 +0200
dialog: set lower limit for dlg_ka_interval parameter to 30 sec
- avoid many keepalives in shorter interval than retransmission timeout
could be
- an improvement would be to export the fr_timer value from tm and have
condition based on it
- reported by FS#417, Bill Radis
---
modules/dialog/dialog.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/modules/dialog/dialog.c b/modules/dialog/dialog.c
index 9c824f3..a655c57 100644
--- a/modules/dialog/dialog.c
+++ b/modules/dialog/dialog.c
@@ -452,6 +452,12 @@ static int mod_init(void)
{
unsigned int n;
+ if(dlg_ka_interval!=0 && dlg_ka_interval<30) {
+ LM_ERR("ka interval too low (%d), has to be at least 30\n",
+ dlg_ka_interval);
+ return -1;
+ }
+
dlg_event_rt[DLG_EVENTRT_START] = route_lookup(&event_rt,
"dialog:start");
dlg_event_rt[DLG_EVENTRT_END] = route_lookup(&event_rt, "dialog:end");
dlg_event_rt[DLG_EVENTRT_FAILED] = route_lookup(&event_rt,
"dialog:failed");