#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"

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_list * | req_in_tmcb_hl = 0 |
| struct tmcb_head_list | tmcb_pending_hl = {0,0} |
| unsigned int | tmcb_pending_id = -1 |
Definition in file t_hooks.c.
| 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 | ) |
Definition at line 55 of file t_hooks.c.
References tmcb_head_list::first, tm_callback::next, tm_callback::param, tmcb_head_list::reg_types, tm_callback::release, and shm_free.
Referenced by destroy_tmcb_lists(), free_cell(), and register_tmcb().
| 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.
| 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).
| p_msg | SIP message | |
| t | transaction | |
| types | ||
| f | callback | |
| param | callback parameter | |
| release_func | release function for the callback parameter |
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().
run all REQUEST_IN callbacks
Definition at line 254 of file t_hooks.c.
References tm_callback::callback, tmcb_params::code, tmcb_params::extra1, tmcb_params::extra2, tmcb_head_list::first, get_t(), tm_callback::id, LM_DBG, tm_callback::next, tm_callback::param, tmcb_params::param, tmcb_params::req, tmcb_params::rpl, set_avp_list(), set_t(), tm_callback::types, and cell::user_avps.
Referenced by build_cell().
| 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.
| type | callback type | |
| trans | transaction | |
| req | SIP request | |
| rpl | SIP reply | |
| code | callback code |
Definition at line 220 of file t_hooks.c.
References tm_callback::callback, clean_msg_clone(), tmcb_params::code, ua_server::end_request, tmcb_params::extra1, tmcb_params::extra2, tmcb_head_list::first, FL_SHM_CLONE, get_t(), tm_callback::id, LM_DBG, sip_msg::msg_flags, tm_callback::next, tm_callback::param, tmcb_params::param, tmcb_head_list::reg_types, tmcb_params::req, ua_server::request, tmcb_params::rpl, set_avp_list(), set_t(), cell::tmcb_hl, tm_callback::types, cell::uas, and cell::user_avps.
Referenced by _reply_light(), cancel_branch(), free_cell(), local_reply(), pre_print_uac_request(), relay_reply(), run_failure_handlers(), t_forward_nonack(), t_newtran(), and t_reply_matching().
| 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().
struct tmcb_params params = {0,0,0,0,0,0} [static] |
| struct tmcb_head_list* req_in_tmcb_hl = 0 |
| struct tmcb_head_list tmcb_pending_hl = {0,0} |
| unsigned int tmcb_pending_id = -1 |
1.5.6