Hello,
I am proposing to release the next major version in about one week and a
half, Wednesday, Oct 6. Stability of new features looks very good, it
was an extended tresting period since couple of weeks overlapped yearly
common summer holidays.
Now we need to put a bit of efforts in migration documentation.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com
Module: sip-router
Branch: master
Commit: 6ab93de37f2f1991d3406f52ac9502a7c795ef55
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6ab93de…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Sun Sep 26 21:28:47 2010 +0200
core: switch(string) memleak fix
When a switch(string) is used and one of the case blocks exits the
script (by drop, exit or a module function that causes the script
to end), the dynamic string rvals were not cleaned up.
This happened because run_actions() uses longjmp() to quickly end
the script (skipping this way over the cleanups done after the
run_actions() call).
Reported-by: Daniel-Constantin Mierla <miconda(a)gmail.com>
Reported-by: C�sar Pinto Mag�n Cesar.Pinto a-e es
---
action.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/action.c b/action.c
index 8349ff9..ec098ff 100644
--- a/action.c
+++ b/action.c
@@ -1320,17 +1320,39 @@ sw_jt_def:
regexec(mct->match[i].l.regex, s.s, 0, 0, 0) == 0)
){
if (likely(mct->jump[i])){
+ /* make sure we cleanup first, in case run_actions()
+ exits the script directly via longjmp() */
+ if (rv1){
+ rval_destroy(rv1);
+ rval_destroy(rv);
+ rval_cache_clean(&c1);
+ }else if (rv){
+ rval_destroy(rv);
+ rval_cache_clean(&c1);
+ }
ret=run_actions(h, mct->jump[i], msg);
h->run_flags &= ~BREAK_R_F; /* catch breaks, but let
returns passthrough */
+ break;
}
goto match_cleanup;
}
match_cond_def:
if (mct->def){
+ /* make sure we cleanup first, in case run_actions()
+ exits the script directly via longjmp() */
+ if (rv1){
+ rval_destroy(rv1);
+ rval_destroy(rv);
+ rval_cache_clean(&c1);
+ }else if (rv){
+ rval_destroy(rv);
+ rval_cache_clean(&c1);
+ }
ret=run_actions(h, mct->def, msg);
h->run_flags &= ~BREAK_R_F; /* catch breaks, but let
returns passthrough */
+ break;
}
match_cleanup:
if (rv1){
Module: sip-router
Branch: master
Commit: c3e19d24545e45e021000a53dc8b448cbe9442d3
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c3e19d2…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Sun Sep 26 15:02:20 2010 +0200
core: print function name by default in LOGs
---
dprint.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dprint.h b/dprint.h
index 8f50b1f..2da1243 100644
--- a/dprint.h
+++ b/dprint.h
@@ -41,6 +41,9 @@
/** if defined the function name will also be logged. */
#ifdef NO_LOG_FUNC_NAME
# undef LOG_FUNC_NAME
+#else
+/* by default log the function name */
+# define LOG_FUNC_NAME
#endif /* NO_LOG_FUNC_NAME */
/* C >= 99 has __func__, older gcc versions have __FUNCTION__ */
i noticed that in debian squeeze, libcurl3-dev has been replaced by
libcurl4-openssl-dev. perhaps 'libcurl3-dev' in Build-Depends entry of
debian/control should thus be changed to 'libcurl3-dev |
libcurl4-openssl-dev' ?
-- juha
Module: sip-router
Branch: master
Commit: c96d8658da505cddd402963d3469acdd69ac1b5e
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c96d865…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: Sat Sep 25 09:32:35 2010 +0300
modules/lcr: minor fix and improvement
- RPC command lcr.reload caused db tables to be loaded in some
situations more than once.
- If defunct column value of a gw is max UNIX timestamp value 4294967295
or greater, gw is considered currently unused and is not loaded into
memory at all.
---
modules/lcr/README | 4 +++-
modules/lcr/doc/lcr_admin.xml | 3 +++
modules/lcr/lcr_mod.c | 41 ++++++++++++++++++++++-------------------
modules/lcr/lcr_rpc.c | 7 ++-----
4 files changed, 30 insertions(+), 25 deletions(-)
diff --git a/modules/lcr/README b/modules/lcr/README
index 5a4a31a..44b9f1f 100644
--- a/modules/lcr/README
+++ b/modules/lcr/README
@@ -473,7 +473,9 @@ modparam("lcr", "flags_column", "gw_flags")
3.15. defunct_column (string)
Name of the column holding UNIX timestamp telling the time until which
- the gw is considered as defunct.
+ the gw is considered as defunct. If timestamp value is 4294967295 (=
+ max UNIX timestamp value) or greater, gw is considered currently unused
+ and is not loaded into memory at all.
Default value is “defunct”.
diff --git a/modules/lcr/doc/lcr_admin.xml b/modules/lcr/doc/lcr_admin.xml
index 764392f..ab0b45e 100644
--- a/modules/lcr/doc/lcr_admin.xml
+++ b/modules/lcr/doc/lcr_admin.xml
@@ -438,6 +438,9 @@ modparam("lcr", "flags_column", "gw_flags")
<para>
Name of the column holding UNIX timestamp telling the
time until which the gw is considered as defunct.
+ If timestamp value is 4294967295 (= max UNIX timestamp value)
+ or greater, gw is considered currently unused and is not
+ loaded into memory at all.
</para>
<para>
<emphasis>
diff --git a/modules/lcr/lcr_mod.c b/modules/lcr/lcr_mod.c
index 3d74975..6f705e1 100644
--- a/modules/lcr/lcr_mod.c
+++ b/modules/lcr/lcr_mod.c
@@ -1110,10 +1110,29 @@ int reload_tables()
goto err;
}
- null_gw_ip_addr = 0;
+ null_gw_ip_addr = gw_cnt = 0;
for (i = 0; i < RES_ROW_N(res); i++) {
row = RES_ROWS(res) + i;
+ if ((VAL_NULL(ROW_VALUES(row) + 11) == 1) ||
+ (VAL_TYPE(ROW_VALUES(row) + 11) != DB1_INT)) {
+ LM_ERR("lcr_gw id at row <%u> is null or not int\n", i);
+ goto err;
+ }
+ gw_id = (unsigned int)VAL_INT(ROW_VALUES(row) + 11);
+ if (VAL_NULL(ROW_VALUES(row) + 10)) {
+ defunct_until = 0;
+ } else {
+ if (VAL_TYPE(ROW_VALUES(row) + 10) != DB1_INT) {
+ LM_ERR("lcr_gw defunct at row <%u> is not int\n", i);
+ goto err;
+ }
+ defunct_until = (unsigned int)VAL_INT(ROW_VALUES(row) + 10);
+ if (defunct_until > 4294967294UL) {
+ LM_DBG("skipping disabled gw <%u>\n", gw_id);
+ continue;
+ }
+ }
if (!VAL_NULL(ROW_VALUES(row)) &&
(VAL_TYPE(ROW_VALUES(row)) != DB1_STRING)) {
LM_ERR("lcr_gw gw_name at row <%u> is not null or string\n", i);
@@ -1277,22 +1296,8 @@ int reload_tables()
goto err;
}
flags = (unsigned int)VAL_INT(ROW_VALUES(row) + 9);
- if (VAL_NULL(ROW_VALUES(row) + 10)) {
- defunct_until = 0;
- } else {
- if (VAL_TYPE(ROW_VALUES(row) + 10) != DB1_INT) {
- LM_ERR("lcr_gw defunct at row <%u> is not int\n", i);
- goto err;
- }
- defunct_until = (unsigned int)VAL_INT(ROW_VALUES(row) + 10);
- }
- if ((VAL_NULL(ROW_VALUES(row) + 11) == 1) ||
- (VAL_TYPE(ROW_VALUES(row) + 11) != DB1_INT)) {
- LM_ERR("lcr_gw id at row <%u> is null or not int\n", i);
- goto err;
- }
- gw_id = (unsigned int)VAL_INT(ROW_VALUES(row) + 11);
- if (!insert_gw(gws, i + 1, gw_id, gw_name, gw_name_len,
+ gw_cnt++;
+ if (!insert_gw(gws, gw_cnt, gw_id, gw_name, gw_name_len,
scheme, (unsigned int)ip_addr.s_addr, port,
transport, params, params_len, hostname,
hostname_len, ip_string, strip, tag, tag_len, flags,
@@ -1303,8 +1308,6 @@ int reload_tables()
lcr_dbf.free_result(dbh, res);
res = NULL;
-
- gw_cnt = i;
qsort(&(gws[1]), gw_cnt, sizeof(struct gw_info), comp_gws);
gws[0].ip_addr = gw_cnt;
diff --git a/modules/lcr/lcr_rpc.c b/modules/lcr/lcr_rpc.c
index f19297b..2f0d43f 100644
--- a/modules/lcr/lcr_rpc.c
+++ b/modules/lcr/lcr_rpc.c
@@ -46,12 +46,9 @@ static const char* reload_doc[2] = {
static void reload(rpc_t* rpc, void* c)
{
- int i;
lock_get(reload_lock);
- for (i = 1; i <= lcr_count_param; i++) {
- if (reload_tables(i) != 1)
- rpc->fault(c, 500, "LCR Module Reload Failed");
- }
+ if (reload_tables() != 1)
+ rpc->fault(c, 500, "LCR Module Reload Failed");
lock_release(reload_lock);
}
Hello,
before any major release of kamailio (openser), we install and run it
live on voipuser.org sip service. It runs there for more than two weeks
now, it even survived a 18 hours scan attack (approx 12.5 mio requests
"with love from Latvia" - I will write an article about it), so it looks
very solid.
However, there are two features were enabled for this version and are
not really heavily used yet: tls and presence/xcap.
So if you don't plan to test by yourself a local instance of version 3.1
and have time, then maybe you can help by registering some phones at
voipuser.org and play a bit there -- it will be very appreciated to
report if works for you.
If you dont have an account there or don't know about it, some details
here: VoIPUser.org is hosting also our kamailio (openser) forum for many
many years now, the service is open and free, when you register at
http://www.voipuser.org for the forum, you get a sip account as well
(there are some goodies included, like incoming UK did and INUM).
For tls:
- just configure your phone to use tls - if you need it, the port for
tls is 5061. For example, with snom 370 you have to set the outbound
proxy address to: sip.voipuser.org;transport=tls.
For presence/xcap:
- you can test if you have clients supporting SIMPLE presence in
Presence Agent mode (not end-to-end mode)
- the embedded xcap server is enabled, you have to set the xcap root url
to http://sip.voipuser.org:5060/xcap-root or
https://sip.voipuser.org:5061/xcap-root . Authentication for xcap
service is done using same sip username and password
Thanks,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com