Module: sip-router
Branch: master
Commit: 0f5e21c668e46492fb9f9ec69e5b5aafe41bd272
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0f5e21c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Dec 3 10:45:00 2010 +0100
dispatcher(k): fixed use of use_default parameter
- when there was a single destination in destination set and it was in
inactive state, then having parameter use_default=1 caused a divion by
0 while atteptimpting to look for active destaintaion
- reported by Eric Hiller
---
modules_k/dispatcher/dispatch.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/modules_k/dispatcher/dispatch.c b/modules_k/dispatcher/dispatch.c
index bcd7f7c..e42f5d8 100644
--- a/modules_k/dispatcher/dispatch.c
+++ b/modules_k/dispatcher/dispatch.c
@@ -1717,15 +1717,20 @@ int ds_select_dst(struct sip_msg *msg, int set, int alg, int mode)
while ((idx->dlist[i].flags & DS_INACTIVE_DST)
|| (idx->dlist[i].flags & DS_PROBING_DST))
{
- if(ds_use_default!=0)
+ if(ds_use_default!=0 && idx->nr!=1)
i = (i+1)%(idx->nr-1);
else
i = (i+1)%idx->nr;
if(i==hash)
{
+ /* back to start -- looks like no active dst */
if(ds_use_default!=0)
{
i = idx->nr-1;
+ if((idx->dlist[i].flags & DS_INACTIVE_DST)
+ || (idx->dlist[i].flags & DS_PROBING_DST))
+ return -1;
+ break;
} else {
return -1;
}
@@ -1751,6 +1756,7 @@ int ds_select_dst(struct sip_msg *msg, int set, int alg, int mode)
if(dst_avp_name.n!=0)
{
+ /* add default dst to last position in AVP list */
if(ds_use_default!=0 && hash!=idx->nr-1)
{
avp_val.s = idx->dlist[idx->nr-1].uri;
Hi,
first of all - thanks to all these great modules, the kamailio core, the very well documented features. This project is really very well maintained.
I am using the UAC module (V 3.1.0) to make an outbound registration. During testing I used the wrong "realm" for the registration. The result within the log was thousands line of:
...
41(13280) ERROR: uac [uac_reg.c:505]: realms are different - ignire?!?!
44(13286) ERROR: uac [uac_reg.c:505]: realms are different - ignire?!?!
46(13290) ERROR: uac [uac_reg.c:505]: realms are different - ignire?!?!
42(13282) ERROR: uac [uac_reg.c:505]: realms are different - ignire?!?!
44(13286) ERROR: uac [uac_reg.c:505]: realms are different - ignire?!?!
43(13284) ERROR: uac [uac_reg.c:505]: realms are different - ignire?!?!
47(13292) ERROR: uac [uac_reg.c:505]: realms are different - ignire?!?!
45(13288) ERROR: uac [uac_reg.c:505]: realms are different - ignire?!?!
...
And a REGISTER flood from Kamailio to the registration endpoint.
After that, I recognized that I have to restart kamailio to fix the realm. It would be cool to have a "kamctl" function to reload this module.
Best regards and have a nice weekend.
Bernhard Suttner
Hello,
Kamailio SIP Server v3.1.1 is released.
This is a maintenance release of latest stable branch, 3.1, that
includes fixes since release of v3.1.0. There is no change to database
or configuration file required to upgrade to 3.1.1 from 3.1.0 version.
If you run v3.1.0 from tarball or packages, it is strongly recommended
to upgrade to v3.1.1.
For more details about version 3.1.1, visit:
http://www.kamailio.org/w/2010/12/kamailio-v3-1-1-released/
Cheers,
Daniel
--
Daniel-Constantin Mierla
Kamailio (OpenSER) Advanced Training
Jan 24-26, 2011, Irvine, CA, USA
http://www.asipto.com
Hello,
there are almost 2 months since release of Kamailio 3.1.0, so it is time
for 3.1.1 as there were several important fixes done.
I propose Thursday, next week, by that time we should sort out most of
the issues reported lately.
Other opinions?
Cheers,
Daniel
--
Daniel-Constantin Mierla
Kamailio (OpenSER) Advanced Training
Jan 24-26, 2011, Irvine, CA, USA
http://www.asipto.com
Hi All,
thought I would give you a small little perl program I quickly hacked up to
help with some memory leaks I was getting. Turns out I was forgetting to
call release_urecord after a get_urecord on the usrloc module. Because I use
Kamailio in DBOnly mode - the memory was never being freed. This little
program helped me to find the source in no time at all. I hope it helps you
too.
A little info:
The program works on the log file. NB you have to have memlog debugging
enabled for this program to do anything useful. Effectively the program
continuously monitors the log file looking for allocs and frees. It tallies
all the fragments in use and gives a report of all the fragments and where
they weer allocated. It also keeps a running counter of bytes used.
Here is an example of the output:
*****************************************************************************************************************************************************
DUMPING ALL UNFREED MEMORY FRAGMENTS (25)
*****************************************************************************************************************************************************
called from h_table.c: build_cell(251)
6 21312
called from dlg.c: new_dlg_uac(169) 1
128
called from t_msgbuilder.c: build_uac_req(921) 6
1896
called from pv_svar.c: set_var_value(104) 3
132
called from ../../ut.h: shm_str_dup(501)
2 48
called from reply.c: build_contact(127)
1 132
called from t_hooks.c: insert_tmcb(108) 6
144
************************************************************TOTAL BYTES HELD
IN FRAGMENTS:
23792***************************************************************
To use - simply untar into a directory and run ./memalyze.pl
Hope it helps
Cheers
Jason