sip-router
13 years ago- added missing register_fds & get_max_open_fds() declarations
Andrei Pelinescu-Onciul [Sat, 7 Jul 2007 00:33:02 +0000 (00:33 +0000)]
- added missing register_fds & get_max_open_fds() declarations

13 years ago- added register_fds(no), used to register the maximum numbers of fds opened by a...
Andrei Pelinescu-Onciul [Wed, 4 Jul 2007 17:27:33 +0000 (17:27 +0000)]
- added register_fds(no), used to register the maximum numbers of fds opened by a module (on a per process basis). Needed for code that needs to know the maximum possible open fd number (like the tcp code).
- added get_max_open_fds()

13 years ago- timer_del() returns now an int: 0 on success and <0 on error
Andrei Pelinescu-Onciul [Mon, 2 Jul 2007 15:27:39 +0000 (15:27 +0000)]
- timer_del() returns now an int: 0 on success and <0 on error
 (e.g. timer already deleted or expired, or an attempt to self-delete from
  a timer handler)
- added macros for ticks_t comparisons: TICKS_GTi(t1, t2), TICKS_GE(t1, t2),
TICKS_LT (t1, t2) and TICKS_LE (t1, t2)
- updated timer docs

13 years agoonly formatting
Libor Chocholaty [Mon, 2 Jul 2007 11:07:48 +0000 (11:07 +0000)]
only formatting

13 years ago- fix: reset_static_buffer() before running failure, reply or branch routes
Andrei Pelinescu-Onciul [Thu, 28 Jun 2007 12:47:03 +0000 (12:47 +0000)]
- fix: reset_static_buffer()  before running failure, reply or branch routes
      from tm  (needed for select)
 closes SER-288.

13 years ago- hash statistics rpc for hash algo. debugging (only if tm compiled with
Andrei Pelinescu-Onciul [Wed, 27 Jun 2007 21:11:33 +0000 (21:11 +0000)]
- hash statistics rpc for hash algo. debugging (only if tm compiled with
  -DTM_HASH_STATS)

13 years ago- support for float values
Andrei Pelinescu-Onciul [Wed, 27 Jun 2007 21:09:27 +0000 (21:09 +0000)]
- support for float values

13 years ago- change blacklist_hook s/on_blst_add/on_blst_action/
Andrei Pelinescu-Onciul [Tue, 26 Jun 2007 15:35:06 +0000 (15:35 +0000)]
- change blacklist_hook s/on_blst_add/on_blst_action/
  (it can be used now also for search)

13 years ago- callback support also for search/is_blacklisted (can be used to
Andrei Pelinescu-Onciul [Tue, 26 Jun 2007 15:30:07 +0000 (15:30 +0000)]
- callback support also for search/is_blacklisted (can be used to
 implement permanent blacklists, whitelists a.s.o.)
- lock only if the hash bucket list is non-empty

13 years ago- use a bitmap to quickly find size classes with free fragments
Andrei Pelinescu-Onciul [Tue, 26 Jun 2007 13:34:42 +0000 (13:34 +0000)]
- use a bitmap to quickly find size classes with free fragments
  (should speed-up start-up and non-warmed up ser)
- use bit_scan*()

13 years ago - switched to unsigned char for the debruijn hash (now the entire
Andrei Pelinescu-Onciul [Tue, 26 Jun 2007 13:32:54 +0000 (13:32 +0000)]
 - switched to unsigned char for the debruijn hash (now the entire
  lookup table fits into one cacheline; minor performance improvements
  can be seen on pentiumM and sparc64)

13 years agoadded several error messages for better error tracking
Libor Chocholaty [Mon, 25 Jun 2007 17:54:03 +0000 (17:54 +0000)]
added several error messages for better error tracking

13 years agoPreparation for implementation of UPDATE db statement.
Libor Chocholaty [Mon, 25 Jun 2007 17:51:29 +0000 (17:51 +0000)]
Preparation for implementation of UPDATE db statement.
First of all we need two sets of params in db_cmd.
First for match clause and the second as column-value pairs of changed columns.
Currently it uses three sets of parameters: result, match and vals.
 - result - DB_GET output
 - match - DB_GET, DB_DEL (and DB_UPD in the future)
 - vals - DB_PUT (and DB_UPD)

13 years ago- added functions to get the index of the first or last bit set in
Andrei Pelinescu-Onciul [Mon, 25 Jun 2007 17:20:34 +0000 (17:20 +0000)]
- added functions to get the index of the first or last bit set in
a 32 bit or 64 bit int: bit_scan_forward32(), bit_scan_forward64(),
 bit_scan_reverse32(), bit_scan_reverse64(), bit_scan_forward(long) and
  bit_scan_reverse(long). All of them are very fast, they use asm
   if available (for now only for __CPU_x86 and __CPU_x86_64), and fall back
  to a de Bruijn based method or binary search (depending on which method
  was faster in my measurements on a particular cpu).
- added test/profile.h - simple measure the cpu cycles between two calls
 functions (for now support for x86, x86_64 and sparc64)

13 years agomsg prefixes unification
Libor Chocholaty [Mon, 25 Jun 2007 09:41:54 +0000 (09:41 +0000)]
msg prefixes unification

13 years ago- _timegm resets the information about DST in struct tm structure because the
Jan Janak [Thu, 21 Jun 2007 11:38:42 +0000 (11:38 +0000)]
- _timegm resets the information about DST in struct tm structure because the
   date and time in that structure is in UTC.
- added conversion functions that can convert time_t values between local
  timezones and utc.

13 years ago - non forking init_child (PROC_INIT) fix
Andrei Pelinescu-Onciul [Tue, 19 Jun 2007 14:37:54 +0000 (14:37 +0000)]
 - non forking init_child (PROC_INIT) fix
 (closes SER-287)

13 years ago- Local UAC related functions do not register the TMCB_LOCAL_COMPLETED and TMCB_LOCAL...
Miklos Tirpak [Tue, 19 Jun 2007 13:09:35 +0000 (13:09 +0000)]
- Local UAC related functions do not register the TMCB_LOCAL_COMPLETED and TMCB_LOCAL_RESPONSE_OUT callbacks anymore,
they accept a flag indicating the requested callback types instead.
- The function parameters are grouped together in uac_req_t structure, use set_uac_req() macro to fill it (see uac.h)
- It is possible now to free the memory allocated for the callback parameter if necessary, register the TMCB_DESTROY
callback, and free the memory when:
   - TMCB_DESTROY callback is called
   - or tm module fails to create the UAC, the function returns error.

13 years ago- when failing to send on all branches (due to send error, onsend_router or
Andrei Pelinescu-Onciul [Mon, 18 Jun 2007 21:26:34 +0000 (21:26 +0000)]
- when failing to send on all branches (due to send error, onsend_router or
 blacklist), always send back a send error reply (ignore possible dns
  errors which might have happened during dns failover)

13 years ago - updated to the modified dns api
Andrei Pelinescu-Onciul [Mon, 18 Jun 2007 21:23:54 +0000 (21:23 +0000)]
 - updated to the modified dns api

13 years ago- dns naptr support (off by default)
Andrei Pelinescu-Onciul [Mon, 18 Jun 2007 21:20:58 +0000 (21:20 +0000)]
- dns naptr support (off by default)
- dns naptr related config options: dns_try_naptr (off by default),
 dns_udp_pref, dns_tcp_pref. dns_tls_pref (protocol preferences for naptr
  record selection)
- dns srv load balancing config options: dns_srv_lb (off by default)
- dns resolver & cache api change (to support getting the protocol via naptr)
- fix: dns iteration through A &  AAAA records was not correct

For more info see doc/dns.txt.

13 years agoRegent to accomodate latest schema XML changes and postgresql XLT fix.
Maxim Sobolev [Mon, 18 Jun 2007 21:00:13 +0000 (21:00 +0000)]
Regent to accomodate latest schema XML changes and postgresql XLT fix.

13 years agoDon't forget to insert rows into the version table, like other DB
Maxim Sobolev [Mon, 18 Jun 2007 20:58:51 +0000 (20:58 +0000)]
Don't forget to insert rows into the version table, like other DB
backends do.

13 years ago- fix: incorrect iteration through A & AAAA records
Andrei Pelinescu-Onciul [Thu, 14 Jun 2007 23:29:31 +0000 (23:29 +0000)]
- fix: incorrect iteration through A & AAAA records
- support for SRV weight based load balancing as described in rfc2782
 (as opposed to simple failover)

13 years ago- added ISAAC, Bob Jenkins's fast pseudo-random generator and some
Andrei Pelinescu-Onciul [Thu, 14 Jun 2007 23:23:47 +0000 (23:23 +0000)]
- added  ISAAC, Bob Jenkins's fast pseudo-random generator and some
 wrapper arround it (see http://www.burtleburtle.net/bob/rand/isaacafa.html)

13 years ago- uses the new run_actions interface
Andrei Pelinescu-Onciul [Thu, 14 Jun 2007 23:17:57 +0000 (23:17 +0000)]
- uses the new run_actions interface

13 years ago- updated all the users of run_actions() or do_action() to the new
Andrei Pelinescu-Onciul [Thu, 14 Jun 2007 23:14:29 +0000 (23:14 +0000)]
- updated all the users of run_actions() or do_action() to the new
 interface

13 years ago- fix: run_actions() & friends used some static variables to save some
Andrei Pelinescu-Onciul [Thu, 14 Jun 2007 23:12:26 +0000 (23:12 +0000)]
- fix: run_actions() & friends used some static variables to save some
 internal state (run_flags, last_ret a.s.o). Problems would appear when
 different routes (e.g. main route and an onsend route) would execute in
 the same process (e.g. an onsend route return would exit also the
 main route). Now run_actions(), do_action() and eval_expr() take an
 extra "context" parameter (which must be initialized before use).

13 years ago-faster page pre-faulting (when shm_force_alloc = yes): touch only one word
Andrei Pelinescu-Onciul [Thu, 14 Jun 2007 16:59:21 +0000 (16:59 +0000)]
-faster page pre-faulting (when shm_force_alloc = yes): touch only one word
 per page

13 years agoadded incompatibility description into presence handbook and XCAP module documentatio...
Vaclav Kubart [Thu, 14 Jun 2007 15:08:02 +0000 (15:08 +0000)]
added incompatibility description into presence handbook and XCAP module documentation as requested by SER-283

13 years ago- try first to spin a little and only if this fails go through the futex
Andrei Pelinescu-Onciul [Tue, 12 Jun 2007 22:43:19 +0000 (22:43 +0000)]
- try first to spin a little and only if this fails go through the futex
 syscalls (uses ADAPTIVE_WAIT and ADAPTIVE_WAIT_LOOPS like FAST_LOCK). This
  gives a 5% performance increase compared to the "pure" futex version on my
  machine (for tm).

13 years ago- attempt to properly compute the used w/o overhead info
Andrei Pelinescu-Onciul [Tue, 12 Jun 2007 18:22:45 +0000 (18:22 +0000)]
- attempt to properly compute the used w/o overhead info

13 years ago- more mem info: used and real_used (real_used includes the malloc
Andrei Pelinescu-Onciul [Tue, 12 Jun 2007 18:21:42 +0000 (18:21 +0000)]
- more mem info: used and real_used (real_used includes the malloc
 overheads)
- extensive debuggin command for sf_malloc and ll_malloc: core.sfmalloc
(enabled only if ser compiled with -DLL_MALLOC or -DSF_MALLOC).

13 years ago- added sf_malloc: a multi-process safe (internal locking), multi-pool
Andrei Pelinescu-Onciul [Tue, 12 Jun 2007 18:07:12 +0000 (18:07 +0000)]
- added sf_malloc: a multi-process safe (internal locking), multi-pool
 f_malloc version. Should perform better on lots of CPU once properly
 tunned (experimental for now)
- added ll_malloc: same as above but most operation are lockless
 (except for "big" fragment handling). For now needs tunning and
 it still keeps too many debugging statistics. (experimental for now)

13 years agoRefs SER-274, ported from rel_2_0_0
Greger V. Teigre [Tue, 12 Jun 2007 12:57:56 +0000 (12:57 +0000)]
Refs SER-274, ported from rel_2_0_0
  Deleted README.cfg and updated README and added a warning about obsoleted
  file in README-MODULES.

13 years agoRef SER-271, ported from rel_2_0_0
Greger V. Teigre [Tue, 12 Jun 2007 12:52:17 +0000 (12:52 +0000)]
Ref SER-271, ported from rel_2_0_0
  Used cvs2cl.pl (http://www.red-bean.com/cvs2cl/) to generate GNU-style changelog from
  cvs log. Replaced very old ChangeLog with the newly generated one.
  The ChangeLog only goes back to the rel_0_9_0 release branch and thus contains changes
  for release 2.0 release candidate 1.

13 years ago- execute wait timer handlers & retr. handlers in the fast timer
Andrei Pelinescu-Onciul [Sat, 9 Jun 2007 17:48:52 +0000 (17:48 +0000)]
- execute wait timer handlers & retr. handlers in the fast timer
  (=> faster response), but switch to the slow timer for the FR (which
   might take some time: dns failover, failure routes a.s.o). This change
   brought me 300 extra cps (~3%).
- added missing include

13 years ago- use lr from the parsed uri (no need to re-parse the uri params)
Andrei Pelinescu-Onciul [Sat, 9 Jun 2007 17:44:18 +0000 (17:44 +0000)]
- use lr from the parsed uri (no need to re-parse the uri params)

13 years ago- ver. no ++
Andrei Pelinescu-Onciul [Thu, 7 Jun 2007 21:52:30 +0000 (21:52 +0000)]
- ver. no ++
- -DHAVE_SCHED_SETSCHEDULER added on linux
- excluded from normal compilation the modules that throw compile errors:
  avpops  bdb db_ops dbtext flatstore lcr msilo pdt permissions speeddial

13 years ago- support for pre-faulting the shm mem. pages (memset(0))
Andrei Pelinescu-Onciul [Thu, 7 Jun 2007 21:49:53 +0000 (21:49 +0000)]
- support for pre-faulting the shm mem. pages (memset(0))

13 years ago- tm stats changes: cleaner & faster
Andrei Pelinescu-Onciul [Thu, 7 Jun 2007 21:45:56 +0000 (21:45 +0000)]
- tm stats changes: cleaner & faster
- updated to the new PROC_INIT stuff (fixes a tm bug)

13 years ago- new script config vars: mlock_pages, shm_force_alloc, real_time,
Andrei Pelinescu-Onciul [Thu, 7 Jun 2007 21:44:00 +0000 (21:44 +0000)]
- new script config vars: mlock_pages, shm_force_alloc, real_time,
rt_prio, rt_policy, rt_timer1_prio, rt_timer1_policy, rt_timer2_prio,
rt_timer2_policy (for more info see NEWS)

13 years ago- added the new PROC_INIT rank and the init_child(PROC_INIT) calls
Andrei Pelinescu-Onciul [Thu, 7 Jun 2007 21:40:14 +0000 (21:40 +0000)]
- added the new PROC_INIT rank and the init_child(PROC_INIT) calls
 (see doc/modules_init.txt for more info)
- introduced new options for locking pages in memory, pre-faulting
the shared memory pages and real time mode

13 years ago- short module initialization functions description: what you should and
Andrei Pelinescu-Onciul [Thu, 7 Jun 2007 21:34:03 +0000 (21:34 +0000)]
- short module initialization functions description: what you should and
 shouldn't do in mod_init, child_init(PROC_MAIN), child_init(PROC_INIT)
  and child_int(other_values)

13 years ago- attempt to fix the replied_locally statistics
Andrei Pelinescu-Onciul [Thu, 7 Jun 2007 21:04:32 +0000 (21:04 +0000)]
- attempt to fix the replied_locally statistics

13 years ago- t_unref bug check relaxed (false positives)
Andrei Pelinescu-Onciul [Thu, 7 Jun 2007 21:02:40 +0000 (21:02 +0000)]
- t_unref bug check relaxed (false positives)

13 years ago- partial update (new tm stuff a.s.o.)
Andrei Pelinescu-Onciul [Wed, 6 Jun 2007 21:57:13 +0000 (21:57 +0000)]
- partial update (new tm stuff a.s.o.)

13 years ago- ver. no increased
Andrei Pelinescu-Onciul [Wed, 6 Jun 2007 21:56:53 +0000 (21:56 +0000)]
- ver. no increased

13 years ago- attempt to unroll one of the hash loops
Andrei Pelinescu-Onciul [Wed, 6 Jun 2007 21:56:27 +0000 (21:56 +0000)]
- attempt to unroll one of the hash loops

13 years ago- changed tm hash bucket lists (simplified & a little bit faster)
Andrei Pelinescu-Onciul [Wed, 6 Jun 2007 21:54:04 +0000 (21:54 +0000)]
- changed tm hash bucket lists (simplified & a little bit faster)
- inlined some used-a-lot functions
- don't allocate space for md5 if syn_branches is on (default) =>
 32 bytes saved/transaction

13 years ago- re-arranged tmcb structure members so that even if a module compiled
Andrei Pelinescu-Onciul [Wed, 6 Jun 2007 17:36:52 +0000 (17:36 +0000)]
- re-arranged tmcb structure members so that even if a module compiled
 without TMCB_ONSEND uses a callback from a TMCB_ONSEND compiled tm, it
  will still work

13 years ago- paste error fixed ig TMCB_ONSEND is defined (default off)
Andrei Pelinescu-Onciul [Wed, 6 Jun 2007 14:54:04 +0000 (14:54 +0000)]
- paste error fixed ig TMCB_ONSEND is defined (default off)

13 years ago - reply code when no new branch was added fix
Andrei Pelinescu-Onciul [Tue, 5 Jun 2007 22:13:35 +0000 (22:13 +0000)]
 - reply code when no new branch was added fix

13 years ago- removed EXTRA_DEBUG abort() from bug check in t_check and replaced
Andrei Pelinescu-Onciul [Tue, 5 Jun 2007 22:12:41 +0000 (22:12 +0000)]
- removed EXTRA_DEBUG abort() from bug check in t_check and replaced
 the error message w/ a warning: as Gergely and Miklos pointed out this is a
 perfectly valid case and not a bug

13 years ago- blackisted message switched to L_DBG (less noisy)
Andrei Pelinescu-Onciul [Tue, 5 Jun 2007 21:29:26 +0000 (21:29 +0000)]
- blackisted message switched to L_DBG  (less noisy)

13 years ago- extra BUG checks (just to be sure we catch early kr related bugs)
Andrei Pelinescu-Onciul [Tue, 5 Jun 2007 21:27:48 +0000 (21:27 +0000)]
- extra BUG checks (just to be sure we catch early kr related bugs)

13 years ago- warnings & DBG cleanup
Andrei Pelinescu-Onciul [Tue, 5 Jun 2007 21:26:44 +0000 (21:26 +0000)]
- warnings & DBG cleanup

13 years ago- new stats support
Andrei Pelinescu-Onciul [Tue, 5 Jun 2007 21:25:35 +0000 (21:25 +0000)]
- new stats support

13 years ago- fix: kr was not properly reset (set_kr(0) doesn't have the desired effect)
Andrei Pelinescu-Onciul [Tue, 5 Jun 2007 21:24:12 +0000 (21:24 +0000)]
- fix: kr was not properly reset (set_kr(0) doesn't have the desired effect)
- new statistics support

13 years ago- even more tm statistics (usefull for debugging)
Andrei Pelinescu-Onciul [Tue, 5 Jun 2007 21:21:06 +0000 (21:21 +0000)]
- even more tm statistics (usefull for debugging)

13 years ago- compiled only if -DDL_MALLOC is defined (code surrounded by #ifdef)
Andrei Pelinescu-Onciul [Tue, 5 Jun 2007 16:52:53 +0000 (16:52 +0000)]
- compiled only if -DDL_MALLOC is defined (code surrounded by #ifdef)

13 years ago- warning fixes (force casts)
Andrei Pelinescu-Onciul [Tue, 5 Jun 2007 16:35:27 +0000 (16:35 +0000)]
- warning fixes (force casts)

13 years ago- e2ecancel is sent hop by hop (closes SER-68)
Andrei Pelinescu-Onciul [Tue, 5 Jun 2007 15:16:44 +0000 (15:16 +0000)]
- e2ecancel  is sent hop by hop (closes SER-68)
- delayed err reply: delay error replies from t_relay() until end of script: if
  script hasn't replied or dropped the trans., send reply(tm_errno).
- automatic 100 reply generation for invites can be turned on/off via
  a tm global parameter or on a per transaction basis (auto_inv_100,
  t_set_auto_inv_100())  (closes  SER-199)
- different error replies for too many branches, resolve or send error
- if error adding branches, reply with the lowest error
- membar_write before increasing nr_of_outgoings (branches) and membar_depends
 in which_cancel (should allow lockless which_cancel, with the possible race
 of not canceling a branch that is being created in the same time, OTOH
 this happens even if locks are used)

13 years ago- fix: relay_reply/local_reply on error cancel/cancel_bitmap: avoid attempts
Andrei Pelinescu-Onciul [Tue, 5 Jun 2007 14:35:17 +0000 (14:35 +0000)]
- fix: relay_reply/local_reply on error cancel/cancel_bitmap: avoid attempts
  to cancel twice
- fix: wrong silent discarding condition
- noisy_ctimer is now 1 (on) by default (due to the above fix you'll really
  see silent discards without it which is not probably what you want/expect)
- cancel updates:
  - cancel not sent on timeout, for branches on which no reply was received
    (closes SER-254).
  - cancels for silently canceled branches (no replies ever received) are
    automatically generated if later a provisional reply arrives on such a
    branch (close SER-232)
  - if branch canceled (non-silently) and provis. reply on it => immediately
    retransmit cancel
  - should_cancel_branch() can now be called w/o any lock held

13 years ago- tm per transaction retr timers: support for changing the retransmission
Andrei Pelinescu-Onciul [Tue, 5 Jun 2007 14:12:36 +0000 (14:12 +0000)]
- tm per transaction retr timers: support for changing the retransmission
  intervals on the fly, from the script, on a per transaction basis
  (it is enabled if tm is compiled with -DTM_DIFF_RT_TIMEOUT -- default):
  t_set_retr(t1, t2)
- tm transaction lifetime for inv/noninv (config. per transaction): added
  maximum transaction lifetime - a transaction is not allowed to be active
  longer then this interval. See t_set_max_lifetime() or the new
  script params. max_inv_lifetime and max_noninv_lifetime.
- fix: retr_interval was not disabled on error in  retr_buf_hanlder

13 years ago- added MAX_UVAR_VALUE(), MAX_int(a,b) MIN_int(a,b)
Andrei Pelinescu-Onciul [Tue, 5 Jun 2007 13:53:41 +0000 (13:53 +0000)]
- added MAX_UVAR_VALUE(), MAX_int(a,b) MIN_int(a,b)

13 years ago- fix: blacklist timer would could enter and infinite loop, after ~1 h, due
Andrei Pelinescu-Onciul [Tue, 5 Jun 2007 13:52:13 +0000 (13:52 +0000)]
- fix: blacklist timer would could enter and infinite loop, after ~1 h, due
 to an overflowing unsigned short var

13 years agoAdd a new memory allocator (-DDL_MALLOC) which is based on Doug Lea's
Hendrik Scholz [Fri, 1 Jun 2007 09:20:34 +0000 (09:20 +0000)]
Add a new memory allocator (-DDL_MALLOC) which is based on Doug Lea's
dl_malloc implementation (http://g.oswego.edu/dl/html/malloc.html).
Patch has been provided by Jan Andres <jan.andres@freenet-ag.de>

Notes:
 - very fast, esp. on shm_malloc() in comparison to other algorithms
 - has been in production use at freenet(.de) for 6+ months
 - is picky about buffer overruns (aka detects and crashes on them)
 - disabled by default (set -DDL_MALLOC in Makefile.defs)
 - closes SER-278

13 years ago- possible infinite loop fix
Andrei Pelinescu-Onciul [Thu, 31 May 2007 16:17:20 +0000 (16:17 +0000)]
- possible infinite loop fix

13 years ago- added callbacks/hooks for dst_blacklist_add: one can register such
Andrei Pelinescu-Onciul [Wed, 30 May 2007 22:22:42 +0000 (22:22 +0000)]
- added callbacks/hooks for dst_blacklist_add: one can register such
a callback and deny adding a destination to the blacklist list, or
 it can change the destinations flags.

- autodetect if locks or lock_set are not limited and if so use
 one lock per hash bucket or a lock_set of hash table size (should work
  better on multiple cpus, less cacheline invalidations)

13 years ago- minor typos
Andrei Pelinescu-Onciul [Wed, 30 May 2007 21:50:39 +0000 (21:50 +0000)]
- minor typos

13 years ago- TMCB_E2ECANCEL_IN reverted again to pass the invite transaction as param
Andrei Pelinescu-Onciul [Wed, 30 May 2007 18:35:54 +0000 (18:35 +0000)]
- TMCB_E2ECANCEL_IN reverted again to pass the invite transaction as param
- comments update (registering callbacks should now be safe from everywhere)

13 years agoAdd two new config variables to set source IP on outbound TCP connections.
Hendrik Scholz [Wed, 30 May 2007 12:48:24 +0000 (12:48 +0000)]
Add two new config variables to set source IP on outbound TCP connections.
As Jan stated this is useful for HA setups with virtual IPs.

Patch provided by Jan Andres <jan.andres@freenet-ag.de>
Closes SER-277

13 years agot_relay_cancel() is added to the sample configuration
Miklos Tirpak [Wed, 30 May 2007 12:28:17 +0000 (12:28 +0000)]
t_relay_cancel() is added to the sample configuration

13 years agodocumentation is updated with t_relay_cancel(), reparse_invite, and ac_extra_hdrs
Miklos Tirpak [Wed, 30 May 2007 11:19:01 +0000 (11:19 +0000)]
documentation is updated with t_relay_cancel(), reparse_invite, and ac_extra_hdrs

13 years ago- transactions are now deleted when their reference counter reaches 0
Andrei Pelinescu-Onciul [Tue, 29 May 2007 23:59:34 +0000 (23:59 +0000)]
- transactions are now deleted when their reference counter reaches 0
 (this removes the need for the delete timer hack and some extra locking and
  it should reduce memory usage in very busy situations). For now it's still
  possible to revert to the old behaviour by removing the TM_DEL_UNREF define
  in h_table.h.

13 years ago- fixed usage of unalloc. mem.
Andrei Pelinescu-Onciul [Tue, 29 May 2007 21:26:20 +0000 (21:26 +0000)]
-  fixed usage of unalloc. mem.

13 years ago- fixed usage of unalloc. mem.
Andrei Pelinescu-Onciul [Tue, 29 May 2007 21:25:53 +0000 (21:25 +0000)]
- fixed usage of unalloc. mem.

13 years agoCANCELs and negative ACKs are constructed from the INVITE which was sent out
Miklos Tirpak [Tue, 29 May 2007 15:52:37 +0000 (15:52 +0000)]
CANCELs and negative ACKs are constructed from the INVITE which was sent out
instead of building them from the received one. The disadvantage is
that the outgoing INVITE has to be partially reparsed, the advantage is that
the CANCEL/ACK is always RFC-compliant, it always contains the same route-set
as the INVITE message. (closes SER-212)

build_local_reparse() function can be used to construct a CANCEL or ACK, it
reparses the outgoing INVITE and applies the modifications specified by the RFC.

new module parameters:
 - reparse_invite: set it to 0 in order to revert to the old behaviour)
 - ac_extra_hdrs: prefix for additional headers which are kept by build_local_reparse()

new script function:
 - t_relay_cancel() - can be used to catch CANCEL requests at the beginning of the script
                      and bypass the rest of the script processing:

if (!t_relay_cancel()) {  # implicit drop if relaying was successful,
                          # nothing to do

        # corresponding INVITE transaction found but error occurred
        sl_reply("500", "Internal Server Error");
        drop;
}
# bad luck, corresponding INVITE transaction is missing,
# do the same as for INVITEs
...

13 years ago- added membar_depends() for run_callbacks and unmatched_totag
Andrei Pelinescu-Onciul [Tue, 29 May 2007 13:44:19 +0000 (13:44 +0000)]
- added membar_depends() for run_callbacks and unmatched_totag
- callbacks ids are no longer set: nobody uses them and when doing
 a lockeless insert they cause extra expensive writes

13 years ago- added membar_depends(), needed on smp archs. with separate cache banks
Andrei Pelinescu-Onciul [Tue, 29 May 2007 11:31:29 +0000 (11:31 +0000)]
- added membar_depends(), needed on smp archs. with separate cache banks
 where it's possible to get a new pointer value, but the old pointer content
 (e.g. if the two are in different cache banks and the "content" bank is very
  busy processing a long invalidations queue). For now only Alpha SMP
 needs it, on all other archs is a no-op (for more info see atomic_ops.h
 , http://lse.sourceforge.net/locking/wmbdd.html,
   http://www.linuxjournal.com/article/8212 or  Alpha Architecture Reference
   Manual Chapter 5.6.

- added membar_atomic_op(), membar_atomic_setget(), membar_read_atomic_op(),
 membar_read_atomic_setget(), membar_write_atomic_op(),
 membar_write_atomic_setget() -- special case memory barriers that can be
  optimized if the atomic ops already force some kind of barrier (e.g. x86),
   see the description in atomic_ops.h for more info.

13 years ago- more callback fixes (TMCB_E2E_CANCEL_IN never called after the latest
Andrei Pelinescu-Onciul [Tue, 29 May 2007 09:36:51 +0000 (09:36 +0000)]
- more callback fixes (TMCB_E2E_CANCEL_IN never called after the latest
  changes)
- some minor optimizations attempts (predict all the callback branches/ifs as
 not taken since in the normal case we don't have any callbacks)

13 years agocosmetical changes in presence handbook
Vaclav Kubart [Mon, 28 May 2007 11:33:01 +0000 (11:33 +0000)]
cosmetical changes in presence handbook

13 years ago- darwin sigwait() bug workaround: on darwin sigwait is buggy: it will cause
Andrei Pelinescu-Onciul [Sat, 26 May 2007 11:12:29 +0000 (11:12 +0000)]
- darwin sigwait() bug workaround:  on darwin sigwait is buggy: it will cause
  extreme slow down on signal delivery for the signals it doesn't wait on (I've
  measured a 36s delay on a 1.5Ghz powerbook). The workaround is: sigwait() on
  all the signals we are interested in ser and manually call the master signal
  handler (sig_usr(sig_no)) if the signal!= slow timer signal.

13 years ago- changed darwin module link flags (instead of -bundle_loader ser -flat_namespace...
Andrei Pelinescu-Onciul [Sat, 26 May 2007 10:55:39 +0000 (10:55 +0000)]
- changed darwin module link flags (instead of -bundle_loader ser -flat_namespace -undefined suppress) -- in this way the build module dependecy on ser is
 removed

13 years ago- fixed TMCB_E2ECANCEL_IN wrong value
Andrei Pelinescu-Onciul [Fri, 25 May 2007 16:15:11 +0000 (16:15 +0000)]
- fixed TMCB_E2ECANCEL_IN wrong value
- fixed wrong buffer length in some TMCB_RESPONSE_SENT callback calls
- switched TMCB_E2ECANCEL to path the cancel transaction as param. and not
 the invite one
(bugs reported by Gergely Kovacs <gergo@iptel.org>)

13 years ago- more darwin build with libs fixes (works now)
Andrei Pelinescu-Onciul [Fri, 25 May 2007 15:50:11 +0000 (15:50 +0000)]
- more darwin build with libs fixes (works now)
- sercmd is no longer  force-rebuilt every time

13 years ago- tmcb onsend callbacks update (they get also the request or the reply if they
Andrei Pelinescu-Onciul [Thu, 24 May 2007 18:01:19 +0000 (18:01 +0000)]
- tmcb onsend callbacks update (they get also the request or the reply if they
 are known when the callback is called)
 - added unlikely() when checking if an onsend callback has to be called
 (so that the branch will  be predicted as untaken)

13 years ago - added TMCB_E2E_CANCEL_IN callback, called each a CANCEL mathcing an exisitng invit...
Andrei Pelinescu-Onciul [Thu, 24 May 2007 09:59:39 +0000 (09:59 +0000)]
 - added TMCB_E2E_CANCEL_IN callback, called each a CANCEL mathcing an exisitng invite transaction arrives
- fixed has_tran_tmcb typo(?)

13 years agoneeded to call Makefile.nonser in subdirectories
Vaclav Kubart [Thu, 24 May 2007 07:49:15 +0000 (07:49 +0000)]
needed to call Makefile.nonser in subdirectories

13 years agocreating links with relative path instead of absolute - helps when installed into...
Vaclav Kubart [Thu, 24 May 2007 07:47:25 +0000 (07:47 +0000)]
creating links with relative path instead of absolute - helps when installed into other directory than used for run

13 years ago- generic build libs fixes
Andrei Pelinescu-Onciul [Mon, 21 May 2007 13:55:51 +0000 (13:55 +0000)]
- generic build libs fixes
- untested darwin support for automatically setting the library path /
  rebuilding the lib on changed install path (on darwin
  the library install path is stored in the library itself and from there  it
  is copied in the linked object => if the library path is changed we have to
  re-link the library instead of re-linking the object that links it)

13 years ago- darwin: if no locking method found revert to sys v sems (neither pthread
Andrei Pelinescu-Onciul [Fri, 18 May 2007 10:15:21 +0000 (10:15 +0000)]
- darwin: if no locking method found revert to sys v sems (neither pthread
 mutexes or unnamed posix sems work in darwin for inter process synchronization)

13 years ago- reverted to addic instead of addi - sometimes gcc uses r0 as the second
Andrei Pelinescu-Onciul [Fri, 18 May 2007 10:08:47 +0000 (10:08 +0000)]
- reverted to addic instead of addi - sometimes gcc uses r0 as the second
  operand in addi and  addi rD,r0, val is a special case, equivalent with
  rD=0+val and not rD=r0+val. addic does not have this problem (but sets
  the carry flag in XER).
- some macro fixes

13 years ago- experimental lockless callback insert (callback registration should now be
Andrei Pelinescu-Onciul [Thu, 17 May 2007 11:04:56 +0000 (11:04 +0000)]
- experimental lockless callback insert (callback registration should now be
 safe from everywhere)

13 years agoAdded functions for storing/loading flagged attributes according to user-defined...
Vaclav Kubart [Thu, 17 May 2007 09:58:05 +0000 (09:58 +0000)]
Added functions for storing/loading flagged attributes according to user-defined key.
Documentation will be updated soon (documentation of this module is out of date and
needs to be completely rewritten).
solves SER-252

13 years ago- fixed compile problems when DIALOG_CALLBACKS is defined
Andrei Pelinescu-Onciul [Wed, 16 May 2007 18:56:42 +0000 (18:56 +0000)]
- fixed compile problems when DIALOG_CALLBACKS is defined

13 years ago- callbacks can register to be also called when the transaction or dialog is
Andrei Pelinescu-Onciul [Wed, 16 May 2007 18:32:17 +0000 (18:32 +0000)]
- callbacks can register to be also called when the transaction or dialog is
 destroyed (so that they can free their parameters if needed)

13 years ago- added futex based locking, used by default on linux 2.5.70+
Andrei Pelinescu-Onciul [Mon, 14 May 2007 21:29:46 +0000 (21:29 +0000)]
- added futex based locking, used by default on linux 2.5.70+
 (to turn it off compile with make use_futex=no)
 - moved get_sys_ver from io_wait.c into ut.c

13 years ago- parts of atomic_ops.h moved into atomic/atomic_common.h and
Andrei Pelinescu-Onciul [Mon, 14 May 2007 17:29:31 +0000 (17:29 +0000)]
- parts of atomic_ops.h moved into atomic/atomic_common.h and
  atomic/atomic_native.h

- added membar_eneter_lock() and membar_leave_lock() (to be used only if
creating locks using the atomic ops functions, for more info see atomic_ops.h)