sip-router
10 years agomakefile: even more quiet
Andrei Pelinescu-Onciul [Fri, 9 Oct 2009 19:03:03 +0000 (21:03 +0200)]
makefile: even more quiet

10 years agomodules warning fixes
Andrei Pelinescu-Onciul [Fri, 9 Oct 2009 18:59:18 +0000 (20:59 +0200)]
modules warning fixes

10 years ago* callcontrol
Raul Alexis Betancor Santana [Fri, 9 Oct 2009 18:20:41 +0000 (19:20 +0100)]
* callcontrol

- Ported r6149 from OpenSips:
   added support for customizing call-control messages from the script
- Ported r6236 from OpenSips:
   fixed incorrect release of memory

10 years agomakefile: quiet output support
Andrei Pelinescu-Onciul [Fri, 9 Oct 2009 13:30:02 +0000 (15:30 +0200)]
makefile: quiet output support

Support for quiet output (without all the flags and compile
options): make Q=1 or make QUIET=1.
It can be saved in the config (e.g. make config Q=1) and it can be
overridden any time (e.g. make utils Q=0).
Compilation is a little faster in quiet mode and the same speed as
before in normal mode.

Example module output:
CC (gcc) [M tm.so]              uac.o
LD (gcc) [M tm.so]              tm.so

Lib example:
LD (gcc) [L libbinrpc.so.0.1]           libbinrpc.so.0.1

10 years agoMerge remote branch 'origin/tmp/core_events'
Andrei Pelinescu-Onciul [Fri, 9 Oct 2009 12:16:41 +0000 (14:16 +0200)]
Merge remote branch 'origin/tmp/core_events'

* origin/tmp/core_events:
  core ev: minor cleanups
  topoh: new module for hiding topology details
  core: new sr events system
  core: execute callbacks for NET_DATA_IN and NET_DATA_OUT

10 years agopike_top: moved from tools/ to utils/
Andrei Pelinescu-Onciul [Fri, 9 Oct 2009 12:09:17 +0000 (14:09 +0200)]
pike_top: moved from tools/ to utils/

10 years agokamctl: moved from tools/ to utils/
Andrei Pelinescu-Onciul [Fri, 9 Oct 2009 12:05:15 +0000 (14:05 +0200)]
kamctl: moved from tools/ to utils/

- mv tools/kamctl utils/kamctl
- updated srdb1 Makefile and test/unit/include/common with the new
  kamctl path

10 years agoUpdating INSTALL - mostly formatting
oej [Fri, 9 Oct 2009 09:23:20 +0000 (11:23 +0200)]
Updating INSTALL - mostly formatting

10 years agomakefile: use separate CFLAGS & LDFLAGS for utils
Andrei Pelinescu-Onciul [Thu, 8 Oct 2009 15:45:44 +0000 (17:45 +0200)]
makefile: use separate CFLAGS & LDFLAGS for utils

- added UTILS_CFLAGS and UTILS_LDFLAGS (Makefile.defs and saved in
  the config)
- use UTILS_CFLAGS and UTILS_LDFLAGS when compiling the utils
(fixes a bug when an util compiled by a module will be compiled
 with the module flags)

10 years agounit test: also test for memcache value deletion
Henning Westerholt [Thu, 8 Oct 2009 14:13:43 +0000 (16:13 +0200)]
unit test: also test for memcache value deletion

10 years agomemcached(sr): fix docs for value deletion
Henning Westerholt [Thu, 8 Oct 2009 14:12:52 +0000 (16:12 +0200)]
memcached(sr): fix docs for value deletion

10 years agoMerge branch 'master' of ssh://oej@git.sip-router.org/sip-router
oej [Thu, 8 Oct 2009 13:29:07 +0000 (15:29 +0200)]
Merge branch 'master' of ssh://oej@git.sip-router.org/sip-router

* 'master' of ssh://oej@git.sip-router.org/sip-router:
  pdb(sr): add missing doc Makefile, fix include for pdb_admin.xml, regenerate docs

10 years agoUpdating LDAP readme
oej [Thu, 8 Oct 2009 13:10:48 +0000 (15:10 +0200)]
Updating LDAP readme

10 years agopdb(sr): add missing doc Makefile, fix include for pdb_admin.xml, regenerate docs
Henning Westerholt [Thu, 8 Oct 2009 12:50:31 +0000 (14:50 +0200)]
pdb(sr): add missing doc Makefile, fix include for pdb_admin.xml, regenerate docs

10 years agopv: added init and working destroy functions
Andrei Pelinescu-Onciul [Thu, 8 Oct 2009 10:14:29 +0000 (12:14 +0200)]
pv: added init and working destroy functions

- added init and destroy functions (declared in pvapi_init.h)
- fixed pv_table_free() and tr_table_free() bug

10 years agomem: nicer fm_status() & fm_sums() output
Andrei Pelinescu-Onciul [Thu, 8 Oct 2009 10:11:39 +0000 (12:11 +0200)]
mem: nicer fm_status() & fm_sums() output

Removed useless and confusing current file location information
(we are interested where the fragment was allocated from, and not
where the information is printed).

10 years agomem: include the module name in the debugging info
Andrei Pelinescu-Onciul [Thu, 8 Oct 2009 09:33:25 +0000 (11:33 +0200)]
mem: include the module name in the debugging info

- use <module_name: file> when recording the filename information
  for debugging (DBQ_QM_MALLOC defined)
- added a new file that should define in a portable way the
  various location info (file, function, a.s.o.)

10 years agocore: fix cfg_update() on config error
Andrei Pelinescu-Onciul [Wed, 7 Oct 2009 22:14:32 +0000 (00:14 +0200)]
core: fix cfg_update() on config error

Don't try to use the cfg framework if it was not initialized (it
could happen if for example config parsing fails and shutdown is
triggered before the cfg framework is initialized).

10 years agopv(k): removed $rc and $retcode (they are now in core)
Andrei Pelinescu-Onciul [Wed, 7 Oct 2009 22:03:25 +0000 (00:03 +0200)]
pv(k): removed $rc and $retcode (they are now in core)

10 years agocore: core pvars added for $?/$retcode/$rc
Andrei Pelinescu-Onciul [Wed, 7 Oct 2009 21:57:45 +0000 (23:57 +0200)]
core: core pvars added for $?/$retcode/$rc

- added core pvars (registered before script parsing) for the
  return code ($?, $retcode, $rc). This solves script conflicts
  between the different return code handling (kamailio - pvars and
   ser built-in expr. elem).
- removed ser expr. elem for retcode (not needed anymore)
- added '?' as a valid pvar char (needed so that $? will be
  accepted)

10 years agounit test(sr): fix debug setting and a bunch of paths
Henning Westerholt [Wed, 7 Oct 2009 16:37:55 +0000 (18:37 +0200)]
unit test(sr): fix debug setting and a bunch of paths

10 years agounit test(sr): fix location of kamailio ctl tool
Henning Westerholt [Wed, 7 Oct 2009 16:35:51 +0000 (18:35 +0200)]
unit test(sr): fix location of kamailio ctl tool

10 years agounit test(sr): add initial small test for memcache module
Henning Westerholt [Wed, 7 Oct 2009 16:35:00 +0000 (18:35 +0200)]
unit test(sr): add initial small test for memcache module

10 years agomemcached(sr): add support for setting of value expiration - $mctex(key)
Henning Westerholt [Wed, 7 Oct 2009 16:31:08 +0000 (18:31 +0200)]
memcached(sr): add support for setting of value expiration - $mctex(key)

- add support for setting of value expiration. As the memcache library
  don't provide functions to later change the expire value of an existing
  key we need to fetch the value and then store it again with the given
  time. This should be changed with a different (improved) library
- refactor functions a bit, use a helper method instead of duplicating
  the cache access functions
- update documentation

10 years agocore ev: minor cleanups
Andrei Pelinescu-Onciul [Tue, 6 Oct 2009 12:53:26 +0000 (14:53 +0200)]
core ev: minor cleanups

- use if (unlikely(...)) when executing the callbacks (optimize
  for the case where there are no callbacks)
- debugging info printed only #if EXTRA_DEBUG

10 years agocfg framework: fix shutdown crash for non registered modules
Andrei Pelinescu-Onciul [Tue, 6 Oct 2009 10:47:14 +0000 (12:47 +0200)]
cfg framework: fix shutdown crash for non registered modules

Added cfg_update_no_cbs() which partially updates (no per-child
 callbacks are called) the local config.
It's needed for config update on exit (SIGTERM) for modules that
do not register as cfg users and when the code is compiled with
SIG_DEBUG.

10 years agoChanges to documentation of carrierroute module:
Marius Zbihlei [Tue, 6 Oct 2009 09:41:59 +0000 (12:41 +0300)]
Changes to documentation of carrierroute module:
changed cr_route usage in example as it didn't matched the actual interface
by removing the crc32 parameter.

10 years agosctp: linux kernel obsolete api bug workaround
Andrei Pelinescu-Onciul [Mon, 5 Oct 2009 14:15:30 +0000 (16:15 +0200)]
sctp: linux kernel obsolete api bug workaround

set SPP_PMTUD_ENABLE when changing pathmaxrxt on linux. This was
required on older versions of the api draft (<=14, most likely a
draft bug) and is still required on linux.

Reported-by: Libor Chocholaty libor at iptel org
10 years agomodules_k/msilo: send composed body only if content type is text/plain
Juha Heinanen [Mon, 5 Oct 2009 12:13:56 +0000 (15:13 +0300)]
modules_k/msilo: send composed body only if content type is text/plain

10 years agodb schemes(k): related to commit 8eb5c7071b79, fix Makefile variable
Henning Westerholt [Mon, 5 Oct 2009 11:04:54 +0000 (13:04 +0200)]
db schemes(k): related to commit 8eb5c7071b79, fix Makefile variable

10 years agodb schemes(k): fix loading of DTD from internet, reported from Juha
Henning Westerholt [Mon, 5 Oct 2009 11:03:52 +0000 (13:03 +0200)]
db schemes(k): fix loading of DTD from internet, reported from Juha

10 years agodb_mysql: fix install instead of compile bug
Andrei Pelinescu-Onciul [Mon, 5 Oct 2009 11:08:05 +0000 (13:08 +0200)]
db_mysql: fix install instead of compile bug

Fix for trying to install the extra utils instead of compiling bug
(introduced in the last commit).

11 years ago* modules_k/permissions: fixed checking of db connection
Juha Heinanen [Fri, 2 Oct 2009 13:37:17 +0000 (16:37 +0300)]
* modules_k/permissions: fixed checking of db connection

- In allow_trusted(), check existence of db connection only when in
  non-caching mode.

11 years agomodules_k/permissions: fixed handling of db connection
Juha Heinanen [Fri, 2 Oct 2009 09:00:58 +0000 (12:00 +0300)]
modules_k/permissions: fixed handling of db connection

* Do not close db connection if query fails.
* Check that db connection exists before making a query

11 years agolcr: regenerate database tables
Henning Westerholt [Thu, 1 Oct 2009 16:42:54 +0000 (18:42 +0200)]
lcr: regenerate database tables

11 years agodialog(k): use the version from (old) trunk, the ones from 1.5 is also old
Henning Westerholt [Thu, 1 Oct 2009 16:41:57 +0000 (18:41 +0200)]
dialog(k): use the version from (old) trunk, the ones from 1.5 is also old

11 years agodb docs(k): better to place this in the existing dir 'databases'
Henning Westerholt [Thu, 1 Oct 2009 16:40:07 +0000 (18:40 +0200)]
db docs(k): better to place this in the existing dir 'databases'

11 years agodb schema(k): add XSL files, as the ones from sr not work for us (extensions etc..)
Henning Westerholt [Thu, 1 Oct 2009 16:33:20 +0000 (18:33 +0200)]
db schema(k): add XSL files, as the ones from sr not work for us (extensions etc..)

11 years agosr: add 'make dbschema' target, compatibility to kamailio
Henning Westerholt [Thu, 1 Oct 2009 16:32:34 +0000 (18:32 +0200)]
sr: add 'make dbschema' target, compatibility to kamailio

11 years agopurple(k): add missing purple xml db scheme sources
Henning Westerholt [Thu, 1 Oct 2009 16:27:15 +0000 (18:27 +0200)]
purple(k): add missing purple xml db scheme sources

11 years agodialog(k): copy dialog table from 1.5 branch, the version in this tree is older
Henning Westerholt [Thu, 1 Oct 2009 16:26:17 +0000 (18:26 +0200)]
dialog(k): copy dialog table from 1.5 branch, the version in this tree is older

11 years agomakefile: mysql shared *.sql removed
Andrei Pelinescu-Onciul [Thu, 1 Oct 2009 14:52:17 +0000 (16:52 +0200)]
makefile: mysql shared *.sql removed

mysql shared *.sql files are no longer installed by the main
makefile, but by the db_mysql module.

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 '-'