t_funcs.c File Reference

TM :: Transaction maintenance functions. More...

#include <limits.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include "../../dprint.h"
#include "../../hash_func.h"
#include "../../dset.h"
#include "../../mem/mem.h"
#include "t_funcs.h"
#include "t_fwd.h"
#include "t_msgbuilder.h"
#include "t_lookup.h"
#include "config.h"

Include dependency graph for t_funcs.c:

Go to the source code of this file.

Functions

static int avp2timer (utime_t *timer, int type, int_str name)
 Get the FR_{INV}_TIMER from corresponding AVP.
int fr_avp2timer (utime_t *timer)
 Get the FR_{INV}_TIMER from corresponding AVP.
int fr_inv_avp2timer (utime_t *timer)
int init_avp_params (char *fr_timer_param, char *fr_inv_timer_param, char *contacts_avp_param)
 Initialize AVP module parameters.
static int kill_transaction (struct cell *trans)
void put_on_wait (struct cell *Trans)
int send_pr_buffer (struct retr_buf *rb, void *buf, int len)
int t_relay_to (struct sip_msg *p_msg, struct proxy_l *proxy, int flags)
int t_release_transaction (struct cell *trans)
void tm_shutdown (void)

Variables

str auto_inv_100_reason
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.
static int_str fr_timer_avp
static int fr_timer_avp_type


Detailed Description

TM :: Transaction maintenance functions.

Definition in file t_funcs.c.


Function Documentation

static int avp2timer ( utime_t timer,
int  type,
int_str  name 
) [inline, static]

Get the FR_{INV}_TIMER from corresponding AVP.

Definition at line 364 of file t_funcs.c.

References AVP_VAL_STR, usr_avp::flags, _str::len, LM_ERR, int_str::n, _str::s, int_str::s, search_first_avp(), and str2s().

Referenced by fr_avp2timer(), and fr_inv_avp2timer().

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 init_avp_params ( char *  fr_timer_param,
char *  fr_inv_timer_param,
char *  contacts_avp_param 
)

Initialize AVP module parameters.

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().

static int kill_transaction ( struct cell trans  )  [static]

Definition at line 172 of file t_funcs.c.

References err2reason_phrase(), _str::len, LM_ERR, ua_server::request, _str::s, ser_error, t_reply(), and cell::uas.

Referenced by t_relay_to().

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 
)

int t_relay_to ( struct sip_msg p_msg,
struct proxy_l proxy,
int  flags 
)

int t_release_transaction ( struct cell trans  ) 

void tm_shutdown ( void   ) 


Variable Documentation

Definition at line 146 of file tm/tm.c.

Definition at line 72 of file t_funcs.c.

Referenced by t_load_contacts(), and t_next_contacts().

Definition at line 71 of file t_funcs.c.

Referenced by init_avp_params(), t_load_contacts(), and t_next_contacts().

Definition at line 70 of file t_funcs.c.

Referenced by 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().

Definition at line 68 of file t_funcs.c.

int fr_timer_avp_type [static]

Definition at line 67 of file t_funcs.c.

Referenced by fr_avp2timer(), and init_avp_params().


Generated on Thu May 24 20:00:44 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6