Hello,
There seems to be a design problem in proxy.c mk_proxy(str* name,
unsigned short port, unsigned short proto,
int is_sips) function. The purpose of this function is to create
a proxy and return a pointer to the
created structure.
The issue arises from the fact that the name (type struct str) member of
the proxy structure is not deep copied from the given parameters(refer
to the str* name ) (the hostent structure is instead deep copied). This
isn't a problem for now but I have worked on a small patch that caches
proxies (using add_proxy() and find_proxy()) and ,because of this
shallow copy, things are broken.
I said that this is a design problem because we can let the shallow copy
happen (performance is better), and when needed the caller should
provide a buffer that doesn't change (let him do the copy instead). This
is not clearly documented but done from /modules(_k)/utils/conf.c. But
it this way we may have a memory leak when the proxy is deallocated,
because I doubt that the caller keeps track of the allocated buffers(the
code in proxy.c doesn't take ownership of the given pointer).
This affects functions mk_proxy and mk_shm_proxy in both kamailio(1.5 to
speak of) and sip-router.
I have created a patch that also does a deep copy of the name, thus
removing the need for the caller to bother about the lifetime of the
name buffer.
Any ideas?!
Cheers
Marius
Module: sip-router
Branch: andrei/cdefs2doc
Commit: 77523f394f3f37317f85917fe1df89d2c027392d
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=77523f3…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Tue Jan 26 19:34:53 2010 +0100
doc: select doc generator: more fixes & core selects support
- support core select file: file with core selects that
might be referenced from the current file. To use it the new
"-c" or "--core" command line parameters must be used, e.g.:
dump_selects.pl -f modules_s/textops/textops.c -c select_core.c
- fixed handling of the NESTED and NESTED| CONSUME_* combinations
---
doc/scripts/cdefs2doc/dump_selects.pl | 301 ++++++++++++++++++---------------
1 files changed, 162 insertions(+), 139 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=775…
Module: sip-router
Branch: sr_3.0
Commit: 0e1baf00ab3419fe08f99680b9e4ca72623a15d8
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0e1baf0…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Tue Jan 26 20:10:53 2010 +0100
Merge remote branch 'origin/tmp/k3.0_sr_backports' into sr_3.0
* origin/tmp/k3.0_sr_backports: (86 commits)
usrloc(k): rpc version for ul.dump
core: init the len of sock_str attribute
ctl: added parameters to control buffer size
htable(k): rpc commad to dump htable
pv(k): fixed $shv engine
sanity: print From hdr in warning message
nathelper(k): print bad contact uri
core: more verbose when error parsing hdr
kamailio.cfg: updated cfg with sample PSTN gw routing
nathelper(k): fix for swap scenario
presence(k): aliased MLA to SLA
core: event parsing enahced for dialog;ma
tm: documented t_relay_to() function
tm: added t_relay_to(proxy, flags)
tm: documented t_replicate() functions
tm: t_replicate() can take avps & select as params
tm: added t_replicate(uri)
db_oracle: use PARAM_TYPE_MASK when checking param type
snmpstats: fix param type checking
core: define module_loaded to use find_module_by_name
...
---
Revision: 5969
http://openser.svn.sourceforge.net/openser/?rev=5969&view=rev
Author: henningw
Date: 2010-01-26 16:49:59 +0000 (Tue, 26 Jan 2010)
Log Message:
-----------
* fix a (probably) copy and paste error
Modified Paths:
--------------
branches/1.5/modules/registrar/README
branches/1.5/modules/registrar/doc/registrar_admin.xml
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Hello,
I have worked lately on the patch that tries to mitigate one performance
problem in core:action.c file. I am talking about the multiple
calls to mk_proxy(), and the creation of temporary proxies for each
FORWARD_T action that the daemon executes.
I think this behaviour can be improved by caching certain proxies. My
idea is this:
* If the next_hop matches a name in the alias list (for example we
have an alias for example.com and the next_hop is proxy1.example.com),
then cache the proxy by calling add_proxy instead of mk_proxy. If the
proxy is already cached a pointer is returned, if not it is created and
added (the functionality already exists in proxy.c)
* For all other hosts a temporary proxy is made(same as now).
This whole logic can be turned off(default)/on by a parameter in .cfg.
I have run some tests and this can lead to big improvemets (because
mk_proxy mean some pkg_malloc - fast but also some DNS resolving -
slow). This might benefit some medium-large setups where you have some
servers forwarding request to other application servers, etc.
The patch is very small and it's already done and finished. I will
provide it tomorrow if somebody thinks this idea is good
Cheers
Marius
harmful stearate and to ree medications can prescription would, https://www.assembla.com/spaces/ultra/documents/dl1fjocGSr34UMeJe5afGb/down… tramadol saturday, >:PP,
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: SER-453
URL: http://tracker.iptel.org/browse/SER-453
Project: SER
Issue Type: Bug
Affects Versions: 2.0
Environment: 64 bit CPU, Debian lenny OS
Assigned To: Vaclav Kubart
Fix For: 2.0, Ipteldorf
When I try to store message in the database I get the following errors in
the syslog (There are no messages stored in the database):
May 14 15:26:40 sen ser[5853]: ERROR: parse_uri: uri too short: <> (0)
May 14 15:26:40 sen ser[5853]: ERROR: uri2dst: bad_uri:
May 14 15:26:40 sen ser[5853]: t_uac: no socket found
And here is ser.cfg:
xlog("L_INFO", " route[INBOUND]: (m_store (0, )) \n");
if (m_store ("0", ""))
{
xlog("L_INFO", " route[INBOUND]: offline message stored \n");
xlog("L_INFO", " route[INBOUND]: (!t_reply(202,Accepted) \n");
if (!t_reply("202", "Accepted"))
{
xlog("L_INFO", " route[INBOUND]: sl_reply_error() \n");
sl_reply_error();
}
}
the error appears in the following place accordin to my logging:
May 14 15:26:40 sen ser[5853]: route[INBOUND]: (m_store (0, ))
May 14 15:26:40 sen ser[5853]: ERROR: parse_uri: uri too short: <> (0)
May 14 15:26:40 sen ser[5853]: ERROR: uri2dst: bad_uri:
May 14 15:26:40 sen ser[5853]: t_uac: no socket found
May 14 15:26:40 sen ser[5853]: route[INBOUND]: offline message stored
May 14 15:26:40 sen ser[5853]: route[INBOUND]: (!t_reply(202,Accepted)
May 14 15:26:40 sen ser[5853]: route[INBOUND]: drop <MESSAGE>
<sip:hulk@voip.rd.touk.pl>
Below is the Message transaction sent through SER:
U 2007/05/14 15:26:40.746835 192.168.0.165:7089 -> 192.168.0.165:5060
MESSAGE sip:hulk@voip.rd.touk.pl SIP/2.0.
CSeq: 64 MESSAGE.
Via: SIP/2.0/UDP
192.168.0.165:7089;branch=z9hG4bK24d4276b-8c00-dc11-982b-00148539376e;rport.
From: "Sen"
<sip:sen@voip.rd.touk.pl>;tag=a0d0276b-8c00-dc11-982b-00148539376e.
Call-ID: 32c6276b-8c00-dc11-982b-00148539376e@sen.
To: "hulk@" <sip:hulk@voip.rd.touk.pl>.
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,NOTIFY,REFER,MESSAGE.
Content-Type: text/plain;charset=UTF-8.
Content-Length: 12.
Max-Forwards: 70.
.
test message
#
U 2007/05/14 15:26:40.790793 192.168.0.165:5060 -> 192.168.0.165:7089
SIP/2.0 202 Accepted.
CSeq: 64 MESSAGE.
Via: SIP/2.0/UDP
192.168.0.165:7089;branch=z9hG4bK24d4276b-8c00-dc11-982b-00148539376e;rport=7089.
From: "Sen"
<sip:sen@voip.rd.touk.pl>;tag=a0d0276b-8c00-dc11-982b-00148539376e.
Call-ID: 32c6276b-8c00-dc11-982b-00148539376e@sen.
To: "hulk@"
<sip:hulk@voip.rd.touk.pl>;tag=a6a1c5f60faecf035a1ae5b6e96e979a-fd05.
Server: Sip EXpress router (2.0.0-rc1 (x86_64/linux)).
Content-Length: 0.
Warning: 392 192.168.0.165:5060 "Noisy feedback tells: pid=5853
req_src_ip=192.168.0.165 req_src_port=7089 in_uri=sip:hulk@voip.rd.touk.pl
out_uri=sip:hulk@voip.rd.touk.pl via_cnt==1".
.
In the attachment is a patch for the msilo.c source file where there was a need for two small corrections.
Cheers
Tomasz Zieleniewski
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tracker.iptel.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
credit that ffffff and prevent using boards be Ultracet tumours, https://www.assembla.com/spaces/ultra/documents/b8AI2IcGKr34XKeJe5aVNr/down… tramadol 180, 04550,
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: SER-449
URL: http://tracker.iptel.org/browse/SER-449
Project: SER
Issue Type: Bug
Affects Versions: 2.0
Environment: 64 bit CPU, Debian lenny OS
Assigned To: Vaclav Kubart
Fix For: 2.0, Ipteldorf
When I try to store message in the database I get the following errors in
the syslog (There are no messages stored in the database):
May 14 15:26:40 sen ser[5853]: ERROR: parse_uri: uri too short: <> (0)
May 14 15:26:40 sen ser[5853]: ERROR: uri2dst: bad_uri:
May 14 15:26:40 sen ser[5853]: t_uac: no socket found
And here is ser.cfg:
xlog("L_INFO", " route[INBOUND]: (m_store (0, )) \n");
if (m_store ("0", ""))
{
xlog("L_INFO", " route[INBOUND]: offline message stored \n");
xlog("L_INFO", " route[INBOUND]: (!t_reply(202,Accepted) \n");
if (!t_reply("202", "Accepted"))
{
xlog("L_INFO", " route[INBOUND]: sl_reply_error() \n");
sl_reply_error();
}
}
the error appears in the following place accordin to my logging:
May 14 15:26:40 sen ser[5853]: route[INBOUND]: (m_store (0, ))
May 14 15:26:40 sen ser[5853]: ERROR: parse_uri: uri too short: <> (0)
May 14 15:26:40 sen ser[5853]: ERROR: uri2dst: bad_uri:
May 14 15:26:40 sen ser[5853]: t_uac: no socket found
May 14 15:26:40 sen ser[5853]: route[INBOUND]: offline message stored
May 14 15:26:40 sen ser[5853]: route[INBOUND]: (!t_reply(202,Accepted)
May 14 15:26:40 sen ser[5853]: route[INBOUND]: drop <MESSAGE>
<sip:hulk@voip.rd.touk.pl>
Below is the Message transaction sent through SER:
U 2007/05/14 15:26:40.746835 192.168.0.165:7089 -> 192.168.0.165:5060
MESSAGE sip:hulk@voip.rd.touk.pl SIP/2.0.
CSeq: 64 MESSAGE.
Via: SIP/2.0/UDP
192.168.0.165:7089;branch=z9hG4bK24d4276b-8c00-dc11-982b-00148539376e;rport.
From: "Sen"
<sip:sen@voip.rd.touk.pl>;tag=a0d0276b-8c00-dc11-982b-00148539376e.
Call-ID: 32c6276b-8c00-dc11-982b-00148539376e@sen.
To: "hulk@" <sip:hulk@voip.rd.touk.pl>.
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,NOTIFY,REFER,MESSAGE.
Content-Type: text/plain;charset=UTF-8.
Content-Length: 12.
Max-Forwards: 70.
.
test message
#
U 2007/05/14 15:26:40.790793 192.168.0.165:5060 -> 192.168.0.165:7089
SIP/2.0 202 Accepted.
CSeq: 64 MESSAGE.
Via: SIP/2.0/UDP
192.168.0.165:7089;branch=z9hG4bK24d4276b-8c00-dc11-982b-00148539376e;rport=7089.
From: "Sen"
<sip:sen@voip.rd.touk.pl>;tag=a0d0276b-8c00-dc11-982b-00148539376e.
Call-ID: 32c6276b-8c00-dc11-982b-00148539376e@sen.
To: "hulk@"
<sip:hulk@voip.rd.touk.pl>;tag=a6a1c5f60faecf035a1ae5b6e96e979a-fd05.
Server: Sip EXpress router (2.0.0-rc1 (x86_64/linux)).
Content-Length: 0.
Warning: 392 192.168.0.165:5060 "Noisy feedback tells: pid=5853
req_src_ip=192.168.0.165 req_src_port=7089 in_uri=sip:hulk@voip.rd.touk.pl
out_uri=sip:hulk@voip.rd.touk.pl via_cnt==1".
.
In the attachment is a patch for the msilo.c source file where there was a need for two small corrections.
Cheers
Tomasz Zieleniewski
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tracker.iptel.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira