t_hooks.c File Reference

TM :: ??? More...

#include "stdlib.h"
#include "../../dprint.h"
#include "../../error.h"
#include "../../mem/mem.h"
#include "../../usr_avp.h"
#include "t_hooks.h"
#include "t_lookup.h"
#include "t_funcs.h"

Include dependency graph for t_hooks.c:

Go to the source code of this file.

Functions

void destroy_tmcb_lists (void)
void empty_tmcb_list (struct tmcb_head_list *head)
int init_tmcb_lists (void)
int insert_tmcb (struct tmcb_head_list *cb_list, int types, transaction_cb f, void *param, release_tmcb_param release_func)
 Inserts a callback into the a callback list.
int register_tmcb (struct sip_msg *p_msg, struct cell *t, int types, transaction_cb f, void *param, release_tmcb_param release_func)
 Register a callback function for several types of events.
void run_reqin_callbacks (struct cell *trans, struct sip_msg *req, int code)
 run all REQUEST_IN callbacks
void run_trans_callbacks (int type, struct cell *trans, struct sip_msg *req, struct sip_msg *rpl, int code)
 Run all transaction callbacks for an event type.
void set_extra_tmcb_params (void *extra1, void *extra2)
 Set extra parameter for tm callback.

Variables

static struct tmcb_params params = {0,0,0,0,0,0}
struct tmcb_head_listreq_in_tmcb_hl = 0
struct tmcb_head_list tmcb_pending_hl = {0,0}
unsigned int tmcb_pending_id = -1


Detailed Description

TM :: ???

Definition in file t_hooks.c.


Function Documentation

void destroy_tmcb_lists ( void   ) 

Definition at line 85 of file t_hooks.c.

References empty_tmcb_list(), and shm_free.

Referenced by tm_shutdown().

void empty_tmcb_list ( struct tmcb_head_list head  ) 

int init_tmcb_lists ( void   ) 

Definition at line 71 of file t_hooks.c.

References tmcb_head_list::first, LM_CRIT, tmcb_head_list::reg_types, and shm_malloc().

Referenced by mod_init().

int insert_tmcb ( struct tmcb_head_list cb_list,
int  types,
transaction_cb  f,
void *  param,
release_tmcb_param  release_func 
)

Inserts a callback into the a callback list.

Parameters:
cb_list callback list
types callback type
f transaction callback
param callback parameter

Definition at line 102 of file t_hooks.c.

References tm_callback::callback, E_OUT_OF_MEM, tmcb_head_list::first, tm_callback::id, LM_ERR, tm_callback::next, tm_callback::param, tmcb_head_list::reg_types, tm_callback::release, shm_malloc(), and tm_callback::types.

Referenced by register_tmcb(), t_uac(), and t_uac_cancel().

int register_tmcb ( struct sip_msg p_msg,
struct cell t,
int  types,
transaction_cb  f,
void *  param,
release_tmcb_param  release_func 
)

Register a callback function for several types of events.

Register a callback function 'f' for 'types' mask of events. This will be called back whenever one of the events occurs in transaction module (global or per transaction, depending of event type).

Parameters:
p_msg SIP message
t transaction
types 
f callback
param callback parameter
release_func release function for the callback parameter
Returns:
negative result on error, the return code from insert_tmcb on success

Definition at line 146 of file t_hooks.c.

References E_BUG, E_CFG, empty_tmcb_list(), get_t(), sip_msg::id, insert_tmcb(), LM_CRIT, LM_ERR, NULL, T_UNDEFINED, cell::tmcb_hl, TMCB_MAX, tmcb_pending_id, and TMCB_REQUEST_IN.

Referenced by load_tm().

void run_reqin_callbacks ( struct cell trans,
struct sip_msg req,
int  code 
)

void run_trans_callbacks ( int  type,
struct cell trans,
struct sip_msg req,
struct sip_msg rpl,
int  code 
)

void set_extra_tmcb_params ( void *  extra1,
void *  extra2 
)

Set extra parameter for tm callback.

Definition at line 206 of file t_hooks.c.

References tmcb_params::extra1, and tmcb_params::extra2.

Referenced by _reply_light(), cancel_branch(), relay_reply(), and t_forward_nonack().


Variable Documentation

struct tmcb_params params = {0,0,0,0,0,0} [static]

Definition at line 201 of file t_hooks.c.

Definition at line 49 of file t_hooks.c.

Definition at line 51 of file t_hooks.c.

Referenced by build_cell().

unsigned int tmcb_pending_id = -1

Definition at line 52 of file t_hooks.c.

Referenced by build_cell(), and register_tmcb().


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