#include <errno.h>
#include <netdb.h>
#include "../../mem/shm_mem.h"
#include "../../parser/msg_parser.h"
#include "../../globals.h"
#include "../../udp_server.h"
#include "../../msg_translator.h"
#include "../../timer.h"
#include "../../forward.h"
#include "../../mem/mem.h"
#include "../../md5utils.h"
#include "../../ip_addr.h"
#include "../../parser/parse_uri.h"
#include "../../usr_avp.h"
#include "config.h"
#include "lock.h"
#include "timer.h"
#include "sip_msg.h"
#include "h_table.h"
#include "ut.h"


Go to the source code of this file.
Defines | |
| #define | INIT_REF_UNSAFE(_T_cell) ((_T_cell)->ref_count=1) |
| #define | IS_REFFED_UNSAFE(_T_cell) ((_T_cell)->ref_count!=0) |
| #define | REF_UNSAFE(_T_cell) |
| #define | SEND_BUFFER(_rb) SEND_PR_BUFFER( (_rb) , (_rb)->buffer.s , (_rb)->buffer.len ) |
| #define | SEND_PR_BUFFER(_rb, _bf, _le) send_pr_buffer( (_rb), (_bf), (_le)) |
| #define | TM_T_REPLY_no100_FLAG (1<<1) |
| #define | TM_T_REPLY_nodnsfo_FLAG (1<<3) |
| #define | TM_T_REPLY_noerr_FLAG (1<<2) |
| #define | TM_T_REPLY_repl_FLAG (1<<0) |
| #define | UNREF(_T_cell) |
| #define | UNREF_UNSAFE(_T_cell) |
Functions | |
| static void | _set_fr_retr (struct retr_buf *rb, int retr) |
| void | cleanup_localcancel_timers (struct cell *t) |
| static void | force_retr (struct retr_buf *rb) |
| int | fr_avp2timer (utime_t *timer) |
| Get the FR_{INV}_TIMER from corresponding AVP. | |
| int | fr_inv_avp2timer (utime_t *timer) |
| int | get_ip_and_port_from_uri (str *uri, unsigned int *param_ip, unsigned int *param_port) |
| int | init_avp_params (char *fr_timer_param, char *fr_inv_timer_param, char *contacts_avp_param) |
| Parse and fixup the fr_*_timer AVP specs. | |
| void | put_on_wait (struct cell *Trans) |
| int | send_pr_buffer (struct retr_buf *rb, void *buf, int len) |
| static void | start_retr (struct retr_buf *rb) |
| int | t_add_transaction (struct sip_msg *p_msg) |
| int | t_relay_to (struct sip_msg *p_msg, struct proxy_l *proxy, int replicate) |
| int | t_release_transaction (struct cell *trans) |
| void | tm_shutdown (void) |
Variables | |
| int_str | contacts_avp |
| int | contacts_avp_type |
| int_str | fr_inv_timer_avp |
| int | fr_inv_timer_avp_type |
| FR_INV_TIMER AVP and SERIAL AVP variables needed by next_branches() function. | |
| int | noisy_ctimer |
Definition in file t_funcs.h.
| #define INIT_REF_UNSAFE | ( | _T_cell | ) | ((_T_cell)->ref_count=1) |
| #define IS_REFFED_UNSAFE | ( | _T_cell | ) | ((_T_cell)->ref_count!=0) |
| #define REF_UNSAFE | ( | _T_cell | ) |
Value:
do {\ ((_T_cell)->ref_count++);\ LM_DBG("REF_UNSAFE: after is %d\n",(_T_cell)->ref_count);\ }while(0)
Definition at line 113 of file t_funcs.h.
Referenced by t_lookup_callid(), t_lookup_ident(), t_lookup_request(), t_lookupOriginalT(), and t_reply_matching().
| #define SEND_BUFFER | ( | _rb | ) | SEND_PR_BUFFER( (_rb) , (_rb)->buffer.s , (_rb)->buffer.len ) |
Definition at line 101 of file t_funcs.h.
Referenced by cancel_branch(), retransmission_handler(), t_forward_nonack(), t_uac(), and t_uac_cancel().
| #define SEND_PR_BUFFER | ( | _rb, | |||
| _bf, | |||||
| _le | ) | send_pr_buffer( (_rb), (_bf), (_le)) |
Definition at line 97 of file t_funcs.h.
Referenced by _reply_light(), relay_reply(), send_ack(), and t_retransmit_reply().
| #define TM_T_REPLY_no100_FLAG (1<<1) |
| #define TM_T_REPLY_nodnsfo_FLAG (1<<3) |
| #define TM_T_REPLY_noerr_FLAG (1<<2) |
| #define TM_T_REPLY_repl_FLAG (1<<0) |
| #define UNREF | ( | _T_cell | ) |
Value:
do{ \ LOCK_HASH( (_T_cell)->hash_index ); \ UNREF_UNSAFE(_T_cell); \ UNLOCK_HASH( (_T_cell)->hash_index ); }while(0)
Definition at line 109 of file t_funcs.h.
Referenced by mi_tm_cancel(), t_check_trans(), t_reply_with_body(), t_unref(), and t_unref_cell().
| #define UNREF_UNSAFE | ( | _T_cell | ) |
| static void _set_fr_retr | ( | struct retr_buf * | rb, | |
| int | retr | |||
| ) | [inline, static] |
Definition at line 141 of file t_funcs.h.
References fr_avp2timer(), retr_buf::fr_timer, FR_TIMER_LIST, LM_DBG, retr_buf::retr_list, retr_buf::retr_timer, RT_T1_TO_1, and set_timer().
Referenced by force_retr(), and start_retr().
| void cleanup_localcancel_timers | ( | struct cell * | t | ) |
Definition at line 383 of file modules/tm/timer.c.
References retr_buf::fr_timer, ua_client::local_cancel, cell::nr_of_outgoings, reset_timer(), retr_buf::retr_timer, and cell::uac.
Referenced by wait_handler().
| static void force_retr | ( | struct retr_buf * | rb | ) | [inline, static] |
Definition at line 165 of file t_funcs.h.
References _set_fr_retr().
Referenced by set_final_timer().
| int fr_avp2timer | ( | utime_t * | timer | ) |
Get the FR_{INV}_TIMER from corresponding AVP.
Definition at line 388 of file t_funcs.c.
References avp2timer(), fr_timer_avp_type, and int_str::n.
Referenced by _set_fr_retr().
| int fr_inv_avp2timer | ( | utime_t * | timer | ) |
Definition at line 397 of file t_funcs.c.
References avp2timer(), fr_inv_timer_avp_type, and int_str::n.
Referenced by reply_received().
| int get_ip_and_port_from_uri | ( | str * | uri, | |
| unsigned int * | param_ip, | |||
| unsigned int * | param_port | |||
| ) |
| int init_avp_params | ( | char * | fr_timer_param, | |
| char * | fr_inv_timer_param, | |||
| char * | contacts_avp_param | |||
| ) |
Parse and fixup the fr_*_timer AVP specs.
Definition at line 292 of file t_funcs.c.
References contacts_avp_type, fr_inv_timer_avp_type, fr_timer_avp_type, _str::len, LM_ERR, int_str::n, pv_get_avp_name(), pv_parse_spec(), _pv_spec::pvp, PVT_AVP, _str::s, s, and _pv_spec::type.
Referenced by mod_init().
| void put_on_wait | ( | struct cell * | Trans | ) |
we put the transaction on wait timer; we do it only once in transaction's timelife because putting it multiple-times might result in a second instance of a wait timer to be set after the first one fired; on expiration of the second instance, the transaction would be re-deleted
PROCESS1 PROCESS2 TIMER PROCESS 0. 200/INVITE rx; put_on_wait 1. 200/INVITE rx; 2. WAIT fires; transaction about to be deleted 3. avoid putting on WAIT again 4. WAIT timer executed, transaction deleted
Definition at line 140 of file t_funcs.c.
References LM_DBG, set_1timer(), cell::wait_tl, and WT_TIMER_LIST.
Referenced by _reply_light(), fake_reply(), final_response_handler(), local_reply(), reply_received(), set_final_timer(), t_newtran(), and t_release_transaction().
| int send_pr_buffer | ( | struct retr_buf * | rb, | |
| void * | buf, | |||
| int | len | |||
| ) |
Definition at line 78 of file t_funcs.c.
References retr_buf::dst, len, LM_CRIT, msg_send(), dest_info::proto, dest_info::proto_reserved1, dest_info::send_sock, and dest_info::to.
| static void start_retr | ( | struct retr_buf * | rb | ) | [inline, static] |
Definition at line 159 of file t_funcs.h.
References _set_fr_retr(), retr_buf::dst, dest_info::proto, and PROTO_UDP.
Referenced by add_blind_uac(), cancel_branch(), set_final_timer(), t_forward_nonack(), t_uac(), and t_uac_cancel().
| int t_add_transaction | ( | struct sip_msg * | p_msg | ) |
Definition at line 201 of file t_funcs.c.
References E_BAD_ADDRESS, E_BAD_VIA, cell::flags, forward_request(), free_proxy(), GET_NEXT_HOP, GET_RURI, get_t(), kill_transaction(), LM_DBG, METHOD_ACK, METHOD_INVITE, pkg_free, PROTO_NONE, reply_to_via, ser_error, t_forward_nonack(), T_IS_LOCAL_FLAG, t_newtran(), T_NO_DNS_FAILOVER_FLAG, t_reply(), TM_T_REPLY_no100_FLAG, TM_T_REPLY_nodnsfo_FLAG, TM_T_REPLY_noerr_FLAG, TM_T_REPLY_repl_FLAG, and uri2proxy().
Referenced by t_replicate(), and w_t_relay().
| int t_release_transaction | ( | struct cell * | trans | ) |
Definition at line 121 of file t_funcs.c.
References cleanup_uac_timers(), retr_buf::fr_timer, put_on_wait(), REQ_RLSD, reset_timer(), ua_server::response, retr_buf::retr_timer, set_kr(), and cell::uas.
Referenced by t_lookup_request(), t_newtran(), t_unref(), w_t_relay(), and w_t_release().
| void tm_shutdown | ( | void | ) |
Definition at line 100 of file t_funcs.c.
References destroy_tmcb_lists(), free_hash_table(), free_timer_table(), LM_DBG, lock_cleanup(), and unlink_timer_lists().
Definition at line 71 of file t_funcs.c.
Referenced by init_avp_params(), t_load_contacts(), and t_next_contacts().
FR_INV_TIMER AVP and SERIAL AVP variables needed by next_branches() function.
Definition at line 69 of file t_funcs.c.
Referenced by fr_inv_avp2timer(), init_avp_params(), and t_next_contacts().
| int noisy_ctimer |
1.5.6