Module: sip-router
Branch: master
Commit: 605360798fbad43cbd3ef1aca3ae76cd9c95c50f
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6053607…
Author: Vitaliy Aleksandrov <vitalik.voip(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Sep 13 11:05:07 2013 +0200
usrloc: update connection id for registration refresh
---
modules/usrloc/doc/usrloc_admin.xml | 20 ++++++++++++++++++++
modules/usrloc/ucontact.c | 1 +
modules/usrloc/udomain.c | 3 +++
modules/usrloc/ul_mod.c | 2 +-
4 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/modules/usrloc/doc/usrloc_admin.xml b/modules/usrloc/doc/usrloc_admin.xml
index ce7ddfb..4f7e3e5 100644
--- a/modules/usrloc/doc/usrloc_admin.xml
+++ b/modules/usrloc/doc/usrloc_admin.xml
@@ -875,6 +875,26 @@ modparam("usrloc", "db_ops_ruid", 1)
</example>
</section>
+ <section id="usrloc.p.handle_lost_tcp">
+ <title><varname>handle_lost_tcp</varname> (int)</title>
+ <para>
+ If set to 1, Kamailio will remove location records made via
+ TCP/TLS/WS/WSS transports when it looses corresponding tcp connections.
+ </para>
+ <para>
+ <emphasis>
+ Default value is <quote>0</quote>.
+ </emphasis>
+ <example>
+ <title>Set <varname>handle_lost_tcp</varname>
parameter</title>
+ <programlist format="linespecific">
+...
+modparam("usrloc", "handle_lost_tcp", 1)
+...
+<programlisting>
+ </example>
+ </section>
+
</section>
<section>
diff --git a/modules/usrloc/ucontact.c b/modules/usrloc/ucontact.c
index e7f8938..9cc2e06 100644
--- a/modules/usrloc/ucontact.c
+++ b/modules/usrloc/ucontact.c
@@ -307,6 +307,7 @@ int mem_update_ucontact(ucontact_t* _c, ucontact_info_t* _ci)
_c->last_keepalive = _ci->last_modified;
_c->flags = _ci->flags;
_c->cflags = _ci->cflags;
+ _c->tcpconn_id = _ci->tcpconn_id;
return 0;
}
diff --git a/modules/usrloc/udomain.c b/modules/usrloc/udomain.c
index f587c1b..244f8e7 100644
--- a/modules/usrloc/udomain.c
+++ b/modules/usrloc/udomain.c
@@ -351,6 +351,9 @@ static inline ucontact_info_t* dbrow2info( db_val_t *vals, str
*contact)
ci.reg_id = VAL_UINT(vals+15);
}
+ /* tcp connection id */
+ ci.tcpconn_id = -1;
+
return &ci;
}
diff --git a/modules/usrloc/ul_mod.c b/modules/usrloc/ul_mod.c
index 7d88f67..b1be56b 100644
--- a/modules/usrloc/ul_mod.c
+++ b/modules/usrloc/ul_mod.c
@@ -161,7 +161,7 @@ int timer_interval = 60; /*!< Timer interval in seconds */
int db_mode = 0; /*!< Database sync scheme: 0-no db, 1-write through,
2-write back, 3-only db */
int use_domain = 0; /*!< Whether usrloc should use domain part of aor */
int desc_time_order = 0; /*!< By default do not enable timestamp ordering */
-int handle_lost_tcp = 0;
+int handle_lost_tcp = 0; /*!< By default do not remove contacts before expiration
time */
int ul_fetch_rows = 2000; /*!< number of rows to fetch from result */
int ul_hash_size = 9;