sip-router
11 years agodb_mysql: install shared *.sql files
Andrei Pelinescu-Onciul [Thu, 1 Oct 2009 14:51:36 +0000 (16:51 +0200)]
db_mysql: install shared *.sql files

11 years agomakefile: per modules arch. indep. files install support
Andrei Pelinescu-Onciul [Thu, 1 Oct 2009 14:48:30 +0000 (16:48 +0200)]
makefile: per modules arch. indep. files install support

Support for easily adding arch. independent files that should be
installed along a module.
The following new module makefile variable is supported:

MOD_INSTALL_SHARE - list of files to install into the
arch-independent shared directory (by default
/usr/local/share/$(MAIN_NAME)).

11 years agodoc: serdoc2man.xsl revived
Andrei Pelinescu-Onciul [Thu, 1 Oct 2009 14:29:14 +0000 (16:29 +0200)]
doc: serdoc2man.xsl revived

serdoc2man.xsl is still needed for the ser modules that have
manpages.

11 years agomakefile: doc update for Makefile.utils
Andrei Pelinescu-Onciul [Thu, 1 Oct 2009 14:05:02 +0000 (16:05 +0200)]
makefile: doc update for Makefile.utils

11 years agomakefile: utils and cfg cleanup
Andrei Pelinescu-Onciul [Thu, 1 Oct 2009 14:02:51 +0000 (16:02 +0200)]
makefile:  utils and cfg cleanup

Moved sercmd, sip-router_mysql.sh and tls.cfg install to their
respective modules.

11 years agotls: updated to the new auto install cfg makefile
Andrei Pelinescu-Onciul [Thu, 1 Oct 2009 14:01:34 +0000 (16:01 +0200)]
tls: updated to the new auto install cfg makefile

11 years agodb_mysql: automatically install sip-router_mysql.sh
Andrei Pelinescu-Onciul [Thu, 1 Oct 2009 13:57:33 +0000 (15:57 +0200)]
db_mysql: automatically install sip-router_mysql.sh

11 years agoctl(s): automatically install sercmd
Andrei Pelinescu-Onciul [Thu, 1 Oct 2009 13:56:56 +0000 (15:56 +0200)]
ctl(s): automatically install sercmd

11 years agomakefile: per module extra utils and cfgs install
Andrei Pelinescu-Onciul [Thu, 1 Oct 2009 13:51:47 +0000 (15:51 +0200)]
makefile: per module extra utils and cfgs install

Support for easy adding per module extra scripts, utils (require
compile) or configs.
The following new module makefile variables are supported:

 MOD_INSTALL_UTILS - list of utils directories that should be
 compiled and installed along the module. The utils must know how
 to install themselves (make install).
 E.g.: MOD_INSTALL_UTILS=../../utils/sercmd

 MOD_INSTALL_SCRIPTS - list of scripts (complete path including
 the file name) that should be installed along the module.
 E.g.: MOD_INSTALL_SCRIPTS=../../scripts/foo/foo.sh

 MOD_INSTALL_CFGS - list of extra config files that should be
 installed in the main config directory.

They should be set before including Makefile.modules.

11 years agomakefile: libs install-if-newer minor fix
Andrei Pelinescu-Onciul [Thu, 1 Oct 2009 11:47:05 +0000 (13:47 +0200)]
makefile: libs install-if-newer minor fix

- install-if-newer did re-install the library every time

11 years agomakefile: modules install obeys $(err_fail)
Andrei Pelinescu-Onciul [Thu, 1 Oct 2009 11:45:15 +0000 (13:45 +0200)]
makefile: modules install obeys $(err_fail)

- if err_fail is 1 and a library fails to install the whole make
  install will fail

11 years agomakefile: make install for utils
Andrei Pelinescu-Onciul [Thu, 1 Oct 2009 11:42:36 +0000 (13:42 +0200)]
makefile: make install for utils

- make install for utils
- various small Makefile.utils fixes

11 years agomakefile: use -fsigned-char on some archs
Andrei Pelinescu-Onciul [Thu, 1 Oct 2009 09:28:02 +0000 (11:28 +0200)]
makefile: use -fsigned-char on some archs

Use -fsigned-char for gcc on ppc, ppc64, arm and armv6 to avoid
possible bugs (most people assume char is signed).

11 years agouac: use signed char (minor fix)
Andrei Pelinescu-Onciul [Thu, 1 Oct 2009 09:25:43 +0000 (11:25 +0200)]
uac: use signed char (minor fix)

On some platform/compiler combination char can be unsigned by
default (e.g. gcc arm and ppc) => use signed char when comparing
it with 0.

11 years agolibsrdb1: fix bad include
Andrei Pelinescu-Onciul [Wed, 30 Sep 2009 18:28:03 +0000 (20:28 +0200)]
libsrdb1: fix bad include

Removed unneeded #include </usr/include/limits.h> which breaks
cross-compiling (#include <limits.h> is enough).

11 years agousrloc(s): gcc 2.9x var decls. fixes
Andrei Pelinescu-Onciul [Wed, 30 Sep 2009 23:26:52 +0000 (01:26 +0200)]
usrloc(s): gcc 2.9x var decls. fixes

variable declarations must be at the beginning of the function and
not intercalated in the code.

11 years agopike(s): gcc 2.9x var decls. fixes
Andrei Pelinescu-Onciul [Wed, 30 Sep 2009 23:26:13 +0000 (01:26 +0200)]
pike(s): gcc 2.9x var decls. fixes

variable declarations must be at the beginning of the function and
not intercalated in the code.

11 years agopermissions(s): gcc 2.9x fixes: 0-len arrays & anonymous unions
Andrei Pelinescu-Onciul [Wed, 30 Sep 2009 23:16:08 +0000 (01:16 +0200)]
permissions(s): gcc 2.9x fixes: 0-len arrays & anonymous unions

- replaced flexible arrays (array[]) in structs with 0 length
  arrays (array[0]). Flexible array members are supported in C99,
  but not by gcc 2.9x.
- anonymous union members cannot be accessed when compiling with
  gcc 2.9x.

11 years agoavp_db(s): gcc 2.9x var decls. fixes
Andrei Pelinescu-Onciul [Wed, 30 Sep 2009 23:14:58 +0000 (01:14 +0200)]
avp_db(s): gcc 2.9x var decls. fixes

variable declarations must be at the beginning of the function and
not intercalated in the code.

11 years agoavp(s): tm: gcc-2.9x warning fixes (%zd)
Andrei Pelinescu-Onciul [Wed, 30 Sep 2009 23:13:57 +0000 (01:13 +0200)]
avp(s): tm: gcc-2.9x warning fixes (%zd)

- %zd is not supported in the format string for gcc < 3.0

11 years agolibsrdb1: gcc 2.9x var decls. fixes
Andrei Pelinescu-Onciul [Wed, 30 Sep 2009 23:11:48 +0000 (01:11 +0200)]
libsrdb1: gcc 2.9x var decls. fixes

variable declarations must be at the beginning of the function and
not intercalated in the code.

11 years agotm: gcc-2.9x warning fixes (%zd)
Andrei Pelinescu-Onciul [Wed, 30 Sep 2009 23:09:39 +0000 (01:09 +0200)]
tm: gcc-2.9x warning fixes (%zd)

- %zd is not supported in the format string for gcc < 3.0
- fixed %.*s with non int length warnings (gcc 2.9x)

11 years agocore: fix gcc 2.9x #ifdef in macro args
Andrei Pelinescu-Onciul [Wed, 30 Sep 2009 23:06:03 +0000 (01:06 +0200)]
core: fix gcc 2.9x #ifdef in macro args

gcc version < 3.0 do not support compile directives in macro
arguments.

11 years agocore: LOG() gcc 2.9x fixes
Andrei Pelinescu-Onciul [Wed, 30 Sep 2009 22:58:15 +0000 (00:58 +0200)]
core: LOG() gcc 2.9x fixes

In gcc versions older then 3.0  ## before a variable argument
when the argument is empty will "eat" the _entire_ preceding
sequence of non-whitespace characters (not only the ',').
The fix just adds a space in front of ',' in all the macros calls
that use var args and ##.

11 years agocompiler_opts: __builtin_prefetch supported from gcc 3.1
Andrei Pelinescu-Onciul [Wed, 30 Sep 2009 22:56:49 +0000 (00:56 +0200)]
compiler_opts: __builtin_prefetch supported from gcc 3.1

11 years agomakefile: -m32/-m64 fixes
Andrei Pelinescu-Onciul [Wed, 30 Sep 2009 22:54:32 +0000 (00:54 +0200)]
makefile: -m32/-m64 fixes

- gcc supports -m32/-m64 only from version 3.2 on x86/x86_64 and
  from version 3.0 on sparc/sparc64.

11 years agomakefile: arch detection uses gcc
Andrei Pelinescu-Onciul [Wed, 30 Sep 2009 18:18:23 +0000 (20:18 +0200)]
makefile: arch detection uses gcc

Target architecture detection switched from using the host to
using the target architecture of the compiler, if the compiler is
gcc.
Extra options (CC_EXTRA_OPTS) are taken into account
(e.g. make config CC_EXTRA_OPTS=-m32 will result in i386 on a gcc
configured with default x86_64 arch.).
This should make cross-compiling much easier and should also fix
problems with systems with 64-bit kernels and 32-bits userland or
vice versa (e.g. snow leopard which by default boots a 32-bit
kernel, but its gcc produces only 64-bit binaries).

11 years ago* modules/lcr: gw table db schema fixes
Juha Heinanen [Wed, 30 Sep 2009 13:33:05 +0000 (16:33 +0300)]
* modules/lcr: gw table db schema fixes

- Added missing defunct column.
- Replaced index lcr_id_idx with index lcr_id_gw_name_idx.

11 years ago* Fixed to_any_gw() example.
Juha Heinanen [Sat, 26 Sep 2009 08:50:10 +0000 (11:50 +0300)]
* Fixed to_any_gw() example.

11 years agocore: use current config for the attendant process
Andrei Pelinescu-Onciul [Tue, 29 Sep 2009 15:22:01 +0000 (17:22 +0200)]
core: use current config for the attendant process

Changes in relevant config variables at runtime are now visible in
the attendant process (e.g. debug, memlog, mem_summary).

Signed-off-by: Miklos Tirpak <miklos@iptel.org>
11 years agocfg framework: support for no per-child callbacks procs
Andrei Pelinescu-Onciul [Tue, 29 Sep 2009 15:18:37 +0000 (17:18 +0200)]
cfg framework: support for no per-child callbacks procs

Support for using the config framework from processes that
cannot or do not need to execute cfg per-child callbacks.
For example a process that only monitors some cfg values that do
not involve per-child callbacks, does not ever need to execute
one.

Signed-off-by: Miklos Tirpak <miklos@iptel.org>
11 years agoregistrar(k): missing include
Andrei Pelinescu-Onciul [Tue, 29 Sep 2009 18:06:06 +0000 (20:06 +0200)]
registrar(k): missing include

11 years agoexec(k): append_branch() api changes
Andrei Pelinescu-Onciul [Tue, 29 Sep 2009 18:05:24 +0000 (20:05 +0200)]
exec(k): append_branch() api changes

11 years agodrouting(k): typo fix
Andrei Pelinescu-Onciul [Tue, 29 Sep 2009 18:04:32 +0000 (20:04 +0200)]
drouting(k): typo fix

11 years agodispatcher(k): append_branch() api changes
Andrei Pelinescu-Onciul [Tue, 29 Sep 2009 18:04:02 +0000 (20:04 +0200)]
dispatcher(k): append_branch() api changes

11 years agocpl-c(k): append_branch() api changes
Andrei Pelinescu-Onciul [Tue, 29 Sep 2009 18:03:35 +0000 (20:03 +0200)]
cpl-c(k): append_branch() api changes

11 years agoalias_db(k): append_branch() api changes
Andrei Pelinescu-Onciul [Tue, 29 Sep 2009 18:02:09 +0000 (20:02 +0200)]
alias_db(k): append_branch() api changes

11 years agomakefile: use -fno_strict-overflow on gcc 4.2+
Andrei Pelinescu-Onciul [Tue, 29 Sep 2009 16:38:32 +0000 (18:38 +0200)]
makefile: use -fno_strict-overflow on gcc 4.2+

For gcc versions >= 4.2, use the -fno_strict_overflow compile
option. This is needed to avoid gcc optimizations that assume
signed overflow is undefined and does not wrap around (some parts
of the code assume using two complement arithmetic and
-fstrict-overflow might break them).

11 years agocore: mem dbg options updates + cleanups
Andrei Pelinescu-Onciul [Tue, 29 Sep 2009 13:25:50 +0000 (15:25 +0200)]
core: mem dbg options updates + cleanups

- memlog and memdbg can now be changed at runtime
- double define warning fix for fm_malloc (when compiled with -DF_MALLOC)
- nicer qm_status() & qm_sums() output
- BSD licence for mem/*

11 years agocore: remove VQ_MALLOC memory manager
Henning Westerholt [Tue, 17 Mar 2009 12:24:42 +0000 (13:24 +0100)]
core: remove VQ_MALLOC memory manager

attached patch removes the VQ_MALLOC memory manager from the
sip-router core.  As discussed some time ago, this memory manager
doesn't provide a realloc implementation, and is thus not really
usable for the modules, as some of them needs this. We removed
this in kamailio in the last year, so far nobody missed it.

Signed-off-by: Andrei Pelinescu-Onciul <andrei@iptel.org>
11 years agocore: added mem_summary config option
Andrei Pelinescu-Onciul [Tue, 29 Sep 2009 11:32:48 +0000 (13:32 +0200)]
core: added mem_summary config option

- added mem_summary which controls  the memory debugging info
  logged on exit or on SIGUSR1.  Its value is a combination of
  flags: 0 - off, 1 - dump all used memory blocks and some
  statistics (lots of output), 2 - dump a summary of the used
  memory blocks (works only if compiled with DBG_QM_MALLOC or
  DBG_F_MALLOC).
  The default value is 1 (same behaviour as older versions).

- fix: don't call the memory status/summary functions if
  memlog > debug level (since nothing will be logged anyway).

11 years agomem: summarize in-use memory on exit
Dragos Vingarzan [Mon, 28 Sep 2009 20:01:17 +0000 (22:01 +0200)]
mem: summarize in-use memory on exit

Additional qm_sums and fm_sums as extension to qm_status/fm_status, with
summarized values per allocation source.
Slightly modified SER-224 patch version (no locking, sr changes --andrei).

Closes SER-224.

Signed-off-by: Andrei Pelinescu-Onciul <andrei@iptel.org>
11 years agosnmpstats(k): updated enterprise number
Daniel-Constantin Mierla [Mon, 28 Sep 2009 19:42:28 +0000 (21:42 +0200)]
snmpstats(k): updated enterprise number

- IANA assignment for kamailio.org is 34352

11 years agosnmpstats(k): updated file names in include
Daniel-Constantin Mierla [Mon, 28 Sep 2009 19:29:55 +0000 (21:29 +0200)]
snmpstats(k): updated file names in include

11 years agosnmpstats (k): renamed files - openser* to snmp*
Daniel-Constantin Mierla [Mon, 28 Sep 2009 19:08:24 +0000 (21:08 +0200)]
snmpstats (k): renamed files - openser* to snmp*

11 years agomi_rpc: doc update
Andrei Pelinescu-Onciul [Thu, 24 Sep 2009 16:20:54 +0000 (18:20 +0200)]
mi_rpc: doc update

- async mi commands supported
- added the list of the various rpc mi commands versions (mi,
  mi_dg, mi_xmlrpc and mi_fifo).

11 years agomi_rpc: support for async mi commands
Andrei Pelinescu-Onciul [Thu, 24 Sep 2009 16:06:22 +0000 (18:06 +0200)]
mi_rpc: support for async mi commands

async mi commands can now be executed, if the underlying rpc
transport module supports it (e.g. xmlrpc).

11 years agotm: t_uac_wait rpc error path fixes
Andrei Pelinescu-Onciul [Thu, 24 Sep 2009 15:58:38 +0000 (17:58 +0200)]
tm: t_uac_wait rpc error path fixes

- fix no reply sent on t_uac() failure
- free "delayed" context on t_uac() failure

11 years agotm: fixed empty sl reply warning
Andrei Pelinescu-Onciul [Wed, 23 Sep 2009 20:21:07 +0000 (22:21 +0200)]
tm: fixed empty sl reply warning

11 years agotcp: killed warning
Andrei Pelinescu-Onciul [Wed, 23 Sep 2009 19:48:32 +0000 (21:48 +0200)]
tcp: killed warning

Killed warning for the case when a connection is force closed on
purpose (via set_reply_close()).

11 years agotm: set T before entering local-request route
Andrei Pelinescu-Onciul [Wed, 23 Sep 2009 18:59:40 +0000 (20:59 +0200)]
tm: set T before entering local-request route

11 years agoxmlrpc(s): doc updated
Andrei Pelinescu-Onciul [Wed, 23 Sep 2009 14:19:11 +0000 (16:19 +0200)]
xmlrpc(s): doc updated

- escape_cr and double_lf_to_crlf documented

11 years agoxmlrpc(s): option for replacing double lf with crlf
Andrei Pelinescu-Onciul [Wed, 23 Sep 2009 12:12:50 +0000 (14:12 +0200)]
xmlrpc(s): option for replacing double lf  with crlf

Added "double_lf_to_crlf" config parameter. When set double LFs in
the input xmlrpc strings are replaced with CR LF. This is needed
to work around some xmlrpc buggy clients that don't escape CR
('\r' should be escaped to &#xD; ). When using one of those buggy
clients, use double LF as an escape for CR LF and turn this
 option on.Turning this option on makes it also more compatible with
kamailio tools (kamailio mi xmlrpc always converts double LF to CR
LF).
Note that when double_lf_to_crlf is on it's not possible to send
a double lf.

Here is what the xmlrpc modules sees for various combinations of
CR and LF in the input, when CR is _not_ escaped:
         0        1      (double_lf_to_crlf)
\n   -> \r       \r
\r   -> \r       \r
\r\r -> \n\n     \r\n
\n\n -> \n\n     \r\n
\r\n -> \n !!!   \n !!!
\n\r -> \n\n     \r\n

Note that when double_lf_to_crlf is 0, the xmlrpc module behaves
correctly according to the xml specs.

11 years agoxmlrpc(s): escape CR in replies
Andrei Pelinescu-Onciul [Wed, 23 Sep 2009 10:59:56 +0000 (12:59 +0200)]
xmlrpc(s): escape CR in replies

- escape CR ('\r') in replies: each '\r' is replaced with &xD;
- added new parameter: escape_cr which controls CR escaping: if on
  (default) CR in replies are escaped (according to the xml spec),
  if off, they are not (which in most cases would result in the
  xmlrpc client ignoring them).

11 years agotm docs update
Andrei Pelinescu-Onciul [Tue, 22 Sep 2009 17:27:16 +0000 (19:27 +0200)]
tm docs update

Added disable_6xx_block, ruri_matching, via1_matching,
pass_provisional_replies, default_code, default_reason,
t_set_disable_6xx(), t_set_disable_failover().

11 years agocore: minor macro fix
Andrei Pelinescu-Onciul [Tue, 22 Sep 2009 14:34:04 +0000 (16:34 +0200)]
core: minor macro fix

11 years agotm: disable 6xx or failover on a per message basis
Andrei Pelinescu-Onciul [Tue, 22 Sep 2009 14:27:16 +0000 (16:27 +0200)]
tm: disable 6xx or failover on a per message basis

Added support for disabling 6xx special handling and dns failover
on a per transaction basis:

- t_set_disable_6xx(0|1): disable(1)/enable(0) 6xx rfc special handling.
- t_set_disable_failover(0|1): disable/enable dns failover.

They both work either on the current transaction (if it was
already created) or on the next transaction that will be created
(e.g. t_set_disable_6xx(1); t_relay()  works).

11 years agoperl(k): makefile vars use '_' instead of '-'
Daniel-Constantin Mierla [Tue, 22 Sep 2009 13:37:52 +0000 (15:37 +0200)]
perl(k): makefile vars use '_' instead of '-'

11 years agotm: more cfg framework parameters marked as ATOMIC
Andrei Pelinescu-Onciul [Tue, 22 Sep 2009 12:20:54 +0000 (14:20 +0200)]
tm: more cfg framework parameters marked as ATOMIC

11 years agotm: support for disabling 6xx special handling
Andrei Pelinescu-Onciul [Tue, 22 Sep 2009 11:07:14 +0000 (13:07 +0200)]
tm: support for disabling 6xx special handling

Added disable_6xx_block (same name as in kamailio), which when set
will cause the 6xx to be treated like a normal reply (breaking the
rfc). Default is off.
It can be set also at runtime, e.g.:
sercmd cfg.set_now_int tm disable_6xx_block 1

11 years agokamctl: Makefile to install the tool
Daniel-Constantin Mierla [Tue, 22 Sep 2009 10:47:19 +0000 (12:47 +0200)]
kamctl: Makefile to install the tool

11 years agokamctl: files moved in tools/kamctl/
Daniel-Constantin Mierla [Tue, 22 Sep 2009 09:29:22 +0000 (11:29 +0200)]
kamctl: files moved in tools/kamctl/

- second stange of moving files in own directory
- renamed tmp dir: tools/kamctl1 => tools/kamctl

11 years agokamctl: moved files in own directory
Daniel-Constantin Mierla [Tue, 22 Sep 2009 09:27:49 +0000 (11:27 +0200)]
kamctl: moved files in own directory

- tools/* => tools/kamctl1/*
- avoid the mixture of kamctl and pike_top tools

11 years agotls: tls state is now separate from tcp state
Andrei Pelinescu-Onciul [Mon, 21 Sep 2009 16:43:37 +0000 (18:43 +0200)]
tls: tls state is now separate from tcp state

- tls connection state is now kept separately from the tcp state.
- update tls_h_fix_read_conn() to what tcp expects now.

Closes: FlySpray#14.

11 years agotcp: tls fix_read_con hook return changes
Andrei Pelinescu-Onciul [Mon, 21 Sep 2009 16:41:26 +0000 (18:41 +0200)]
tcp: tls fix_read_con hook return changes

tls_fix_read_con doesn't change the tcp connection state any
longer, relying instead on different return codes.

11 years agotcp: remember which connections were accepted
Andrei Pelinescu-Onciul [Mon, 21 Sep 2009 16:39:41 +0000 (18:39 +0200)]
tcp: remember which connections were accepted

Use a new flag to remember which connection were passively opened
(accept()) and which were locally initiated (connect).

11 years agoscript paser: snd_proto names not recognized fix
Andrei Pelinescu-Onciul [Mon, 21 Sep 2009 16:37:14 +0000 (18:37 +0200)]
script paser: snd_proto names not recognized fix

- if (snd_proto==...) did not work anymore when used with proto
  names instead of numbers.

11 years agoscript paser: proto names not recognized fix
Andrei Pelinescu-Onciul [Mon, 21 Sep 2009 08:06:11 +0000 (10:06 +0200)]
script paser: proto names not recognized fix

- if (proto==...) did not work anymore when used with proto names
  instead of numbers.

Reported-by: Nils Ohlmeier nils at iptel org.
Closes FlySpray#15.

11 years agotls: makefile fix
Andrei Pelinescu-Onciul [Mon, 21 Sep 2009 07:17:04 +0000 (09:17 +0200)]
tls: makefile fix

- wrong order (extra rules should be placed after include
  Makefile.modules)

Closes FlySpray#17.

11 years agotls mk cert script: typo fix
Andrei Pelinescu-Onciul [Mon, 21 Sep 2009 07:16:14 +0000 (09:16 +0200)]
tls mk cert script: typo fix

11 years agoxmlrpc doc: use set_reply_close()
Andrei Pelinescu-Onciul [Fri, 18 Sep 2009 21:56:08 +0000 (23:56 +0200)]
xmlrpc doc: use set_reply_close()

Updated doc & examples to use set_reply_close() and
set_reply_no_connect() in the XMLRPC route instead of return -1.
(this allows using rpc async commands with the broken python
xmlrpclib).

11 years agotm: send_flags can be used in branch & reply routes
Andrei Pelinescu-Onciul [Fri, 18 Sep 2009 19:03:26 +0000 (21:03 +0200)]
tm: send_flags can be used in branch & reply routes

Forwarding send flags can now be used in branch routes (and they
will affect only the current branch) and in reply routes (if the
reply will be forwarded, either as provisional or final reply, the
send_flags will affect it, but they will not affect other
replies).

11 years agocore: send_flags support in the onsend_route
Andrei Pelinescu-Onciul [Fri, 18 Sep 2009 18:58:20 +0000 (20:58 +0200)]
core: send_flags support in the onsend_route

send_flags can now be set also in the onsend_route
(via set_forward_no_connect() or set_forward_close()).

E.g.:
onsend_route{
if (dsp_ip!=10.0.0.0/8)
set_forward_no_connect(); # don't open new connection,
                          # only reuse
}

11 years agotcp: fix fd leak on async error or quick connect
Andrei Pelinescu-Onciul [Fri, 18 Sep 2009 18:52:37 +0000 (20:52 +0200)]
tcp: fix fd leak on async error or quick connect

In some error cases (from which the most likely to appear in
real-life would be maximum global send queue size exceeded),
the fd for a new created connection (in tcp_send()) was not closed
when the connection was destroyed.
Same thing happened in the case of a "quick" connect (connect & send
finish immediately, this happens in general only on localhost) for
a connection marked as close-after-send (via the new msg
send_flags).

11 years agoMerge commit 'origin/andrei/path'
Andrei Pelinescu-Onciul [Fri, 18 Sep 2009 11:36:33 +0000 (13:36 +0200)]
Merge commit 'origin/andrei/path'

* commit 'origin/andrei/path':
  core: add path route headers after local via
  core: path support when forwarding
  tm: path support
  xlog(s): updated to the new next_branch()
  registrar(s): updated to the new append_branch()
  permissions(s): updated to the new next_branch()
  osp(s): updated to the new append_branch()
  exec(s): use ser_append_branch() instead of append_branch()
  cpl-c(s): updated to the new append_branch()
  tm: updated to the new append_branch() & next_branch()
  enum: s/km_append_brach/append_branch/
  avpops: updated to the new append_branch()
  core: append_branch & next_branch api changes

Conflicts:
modules/tm/sip_msg.c
modules/tm/t_fwd.c

11 years agoMerge branch 'rpc_async'
Andrei Pelinescu-Onciul [Fri, 18 Sep 2009 11:16:26 +0000 (13:16 +0200)]
Merge branch 'rpc_async'

* rpc_async:
  tm: async t_uac (t_uac_wait) support
  xmlrpc(s): basic support for delayed replies
  core: rpc capabilities and delayed reply api
  core+tm: moved sip msg clone functions to the core

11 years agoMerge commit 'origin/andrei/send_flags'
Andrei Pelinescu-Onciul [Fri, 18 Sep 2009 10:57:42 +0000 (12:57 +0200)]
Merge commit 'origin/andrei/send_flags'

* commit 'origin/andrei/send_flags':
  NEWS: update
  core: new close after send and reuse only script functions
  tcp: send_flags support
  sl: use the msg reply send_flags
  tm: support for send_flags
  core: send flags support

11 years agoMerge commit 'origin/andrei/to_parser_fix'
Andrei Pelinescu-Onciul [Fri, 18 Sep 2009 10:54:50 +0000 (12:54 +0200)]
Merge commit 'origin/andrei/to_parser_fix'

* commit 'origin/andrei/to_parser_fix':
  core: to parser fix

11 years agoiptrtpproxy doc: regenerated README 3.0_pre1
Andrei Pelinescu-Onciul [Thu, 17 Sep 2009 19:10:26 +0000 (21:10 +0200)]
iptrtpproxy doc: regenerated README

11 years agoMerge commit 'origin/ser_modules'
Andrei Pelinescu-Onciul [Thu, 17 Sep 2009 19:07:54 +0000 (21:07 +0200)]
Merge commit 'origin/ser_modules'

* commit 'origin/ser_modules':
  cfg framework: fix the initialization of child processes
  - iptrtpproxy.cfg support (share config data between iptables and ser module)

11 years agoMerge branch 'cvs-head' of ssh://git.sip-router.org/ser_modules into ser_modules
Andrei Pelinescu-Onciul [Thu, 17 Sep 2009 19:05:45 +0000 (21:05 +0200)]
Merge branch 'cvs-head' of ssh://git.sip-router.org/ser_modules into ser_modules

* 'cvs-head' of ssh://git.sip-router.org/ser_modules:
  cfg framework: fix the initialization of child processes
  - iptrtpproxy.cfg support (share config data between iptables and ser module)

11 years agoNEWS: update
Andrei Pelinescu-Onciul [Tue, 15 Sep 2009 15:51:40 +0000 (17:51 +0200)]
NEWS: update

11 years agocore: new close after send and reuse only script functions
Andrei Pelinescu-Onciul [Tue, 15 Sep 2009 15:47:33 +0000 (17:47 +0200)]
core: new close after send and reuse only script functions

Added new script functions for setting send options for the
current message or its replies:

- set_forward_no_connect() - the message will be forwarded only if
  there is already an open connection to the destination.
- set_reply_no_connect() - like above but for replies to the
  current message.
- set_forward_close() - hint that after forwarding the current
  message the connection should be closed.
- set reply_close() - like above but for replies.

11 years agotcp: send_flags support
Andrei Pelinescu-Onciul [Tue, 15 Sep 2009 15:45:41 +0000 (17:45 +0200)]
tcp: send_flags support

Support for SND_F_FORCE_CON_REUSE and SND_F_CON_CLOSE added to the
tcp code.

11 years agosl: use the msg reply send_flags
Andrei Pelinescu-Onciul [Tue, 15 Sep 2009 15:44:50 +0000 (17:44 +0200)]
sl: use the msg reply send_flags

11 years agotm: support for send_flags
Andrei Pelinescu-Onciul [Tue, 15 Sep 2009 15:43:24 +0000 (17:43 +0200)]
tm: support for send_flags

The send_flags are taken from the current message and added to the
retr_bufs (for branch uacs and replies).

11 years agocore: send flags support
Andrei Pelinescu-Onciul [Tue, 15 Sep 2009 15:38:06 +0000 (17:38 +0200)]
core: send flags support

Added support for send flags and per message send flags.
Right now there are 2 flags defined:
 - SND_F_FORCE_CON_REUSE (forces connection reuse, send will fail if
   a connection does not already exist to the destination)
 - SND_F_CON_CLOSE (hint that after the send completes the
   connection should be closed).
The send flags can be passed directly to msg_send() via
dest_info.send_flags or they can be set for each sip_msg, in which
case forward_request() and forward_reply() will obey them.
The sip_msg flags can be set for replies or for forwarding.

11 years agotm: callback param free functions can use shm_free()
Miklos Tirpak [Mon, 14 Sep 2009 15:57:40 +0000 (17:57 +0200)]
tm: callback param free functions can use shm_free()

The release function of the callback parameters is
called outside of the shared memory lock to make the
implementation of such functions easier.

11 years agocore: add path route headers after local via
Andrei Pelinescu-Onciul [Mon, 14 Sep 2009 11:32:08 +0000 (13:32 +0200)]
core: add path route headers after local via

- minor header order fix: route header generated from recorded
  path are added after the local via if no other route headers are
  present in the message (they were added in front of the local
  via until now).

11 years agoimc(k): fix copy&paste error in example
Daniel-Constantin Mierla [Mon, 14 Sep 2009 08:16:24 +0000 (10:16 +0200)]
imc(k): fix copy&paste error in example

11 years agocfg framework: CFG_CB_ONLY_ONCE documented
Miklos Tirpak [Fri, 11 Sep 2009 10:54:19 +0000 (12:54 +0200)]
cfg framework: CFG_CB_ONLY_ONCE documented

CFG_CB_ONLY_ONCE has been documented

11 years agocfg framework: CFG_CB_ONLY_ONCE flag
Miklos Tirpak [Fri, 11 Sep 2009 10:08:13 +0000 (12:08 +0200)]
cfg framework: CFG_CB_ONLY_ONCE flag

CFG_CB_ONLY_ONCE flag indicates that the per-child
process callback is called only once after the changes
to the global config have been committed.
(The first child process that updates its local
config calls the callback, and no other child
process does so.)
The per-child process cb is intended to be used to
update the config variables that are stored outside
of the cfg framework. By default this callback is called
by all the child processes separately, this can be change
with this flag.

11 years agopdbt: add one helper script, protocol and input data documentation
Henning Westerholt [Thu, 10 Sep 2009 17:32:41 +0000 (19:32 +0200)]
pdbt: add one helper script, protocol and input data documentation

11 years agopdb: add daemon 'pdb_server' and optimising data compiler 'pdbt'
Henning Westerholt [Thu, 10 Sep 2009 16:35:05 +0000 (18:35 +0200)]
pdb: add daemon 'pdb_server' and optimising data compiler 'pdbt'

- add number portability database daemon and optimizing data compiler
- add debian packaging scripts for tool and daemon as well
- TODO:
  - add documentation (run binaries with '-h' for now to get help)
  - fix this redundant declaration of trie (dt* files) and logging (log*).
    There exists already an implementation that uses the sr core parts for
    this, but we import the proven implementation for now.
  - add data helper scripts as well, they need some cleanup first
- initial implementation was done from Hardy Kahl @ 1&1 Internet Ag
- further bug fixes from Timo Reimann, timo dot reimann at 1und1 dot de

11 years agotest: fix path in test 2, add pdb module
Henning Westerholt [Thu, 10 Sep 2009 16:23:21 +0000 (18:23 +0200)]
test: fix path in test 2, add pdb module

11 years agoadd pdb module to the 'stable, but for special use' group in Makefile
Henning Westerholt [Thu, 10 Sep 2009 16:22:07 +0000 (18:22 +0200)]
add pdb module to the 'stable, but for special use' group in Makefile

11 years agotm: mem leak correction #2
Miklos Tirpak [Thu, 10 Sep 2009 16:11:56 +0000 (18:11 +0200)]
tm: mem leak correction #2

- shm_free() needs to be used instead of shm_free_unsafe()
- The callback params may have a release function

11 years agotm: minor mem leak corrected
Miklos Tirpak [Thu, 10 Sep 2009 15:50:57 +0000 (17:50 +0200)]
tm: minor mem leak corrected

After the memory of a cell is allocated other modules
immediately have a chance to register transaction callbacks,
and they may also allocate additional memory for
the callback parameters. When sip_msg_cloner()
failed, the memory allocated for the callback
list was not freed. This happend only when the available
shm memory was already very low which caused sip_msg_cloner()
to fail.

11 years agotextops(k): new function - msg_apply_changes()
Daniel-Constantin Mierla [Thu, 10 Sep 2009 14:22:08 +0000 (16:22 +0200)]
textops(k): new function - msg_apply_changes()

- apply changes done to SIP request content (e.g., via subst(),
  append_hf(), remove_hf(), etc.)
- after using this function, the content of SIP message buffer is
  updated and the initially recevied content is lost
- function can be used in request route blocks
- be careful when used since:
- it changes the way you're used so far
- not much tested with various modules

11 years agoimc(k): return code classes per command
Daniel-Constantin Mierla [Thu, 10 Sep 2009 12:51:08 +0000 (14:51 +0200)]
imc(k): return code classes per command

- for each imc command a range of negative numbers is reserved to signal
  errors to config file
- example enhanced to replect the need of sending replies from config
  file