#include <stdlib.h>
#include "../../mem/shm_mem.h"
#include "../../hash_func.h"
#include "../../dprint.h"
#include "../../md5utils.h"
#include "../../ut.h"
#include "../../error.h"
#include "t_reply.h"
#include "t_cancel.h"
#include "t_stats.h"
#include "h_table.h"
#include "fix_lumps.h"
#include "t_hooks.h"
#include "t_fwd.h"

Go to the source code of this file.
Functions | |
| struct cell * | build_cell (struct sip_msg *p_msg) |
| void | free_cell (struct cell *dead_cell) |
| void | free_hash_table (void) |
| Release all the data contained by the hash table. All the aux. structures as sems, lists, etc, are also released. | |
| enum kill_reason | get_kr (void) |
| struct s_table * | get_tm_table (void) |
| static void | init_branches (struct cell *t) |
| struct s_table * | init_hash_table (void) |
| static void | init_synonym_id (struct cell *t) |
| void | insert_into_hash_table_unsafe (struct cell *p_cell, unsigned int _hash) |
| Takes an already created cell and links it into hash table on the appropriate entry. | |
| void | lock_hash (int i) |
| void | remove_from_hash_table_unsafe (struct cell *p_cell) |
| Un-link a cell from hash_table, but the cell itself is not released. | |
| void | reset_kr (void) |
| void | set_kr (enum kill_reason _kr) |
| unsigned int | transaction_count (void) |
| void | unlock_hash (int i) |
Variables | |
| static enum kill_reason | kr |
| int | syn_branch = 1 |
| static struct s_table * | tm_table |
| pointer to the big table where all the transaction data lives | |
Definition in file h_table.c.
Definition at line 243 of file h_table.c.
References sip_msg::add_rm, cell::dele_tl, destroy_avp_list(), E_OUT_OF_MEM, ua_server::end_request, tmcb_head_list::first, retr_buf::fr_timer, free_via_clen_lump(), has_reqin_tmcbs, sip_msg::id, init_branches(), init_cell_lock(), init_synonym_id(), retr_buf::my_T, tm_callback::next, NULL, cell::relayed_reply_branch, ua_server::request, reset_avps(), ua_server::response, retr_buf::retr_timer, run_reqin_callbacks(), ser_error, set_avp_list(), shm_free, shm_malloc(), sip_msg_cloner(), TG_DEL, TG_FR, TG_RT, TG_WT, cell::tmcb_hl, tmcb_pending_hl, tmcb_pending_id, cell::uas, cell::user_avps, and cell::wait_tl.
Referenced by new_t(), t_uac(), and t_uac_cancel().
| void free_cell | ( | struct cell * | dead_cell | ) |
Definition at line 123 of file h_table.c.
References retr_buf::buffer, BUSY_BUFFER, destroy_avp_list_unsafe(), proxy_l::dn, empty_tmcb_list(), FAKED_REPLY, FL_SHM_CLONE, cell::fwded_totags, has_tran_tmcbs, proxy_l::host, dns_node::kids, ua_client::local_cancel, sip_msg::msg_flags, totag_elem::next, cell::nr_of_outgoings, NULL, ua_client::path_vec, ua_client::proxy, ua_client::reply, ua_client::request, ua_server::request, ua_server::response, run_trans_callbacks(), _str::s, shm_free_unsafe, shm_lock, shm_unlock, sip_msg_free_unsafe, totag_elem::tag, cell::tmcb_hl, TMCB_TRANS_DELETED, cell::uac, cell::uas, and cell::user_avps.
Referenced by delete_cell(), free_hash_table(), t_uac(), t_uac_cancel(), and unlink_timer_lists().
| void free_hash_table | ( | void | ) |
Release all the data contained by the hash table. All the aux. structures as sems, lists, etc, are also released.
Definition at line 329 of file h_table.c.
References s_table::entrys, entry::first_cell, free_cell(), cell::next_cell, shm_free, and TM_TABLE_ENTRIES.
| enum kill_reason get_kr | ( | void | ) |
| struct s_table* get_tm_table | ( | void | ) | [read] |
Definition at line 104 of file h_table.c.
Referenced by matching_3261(), mi_tm_hash(), t_lookup_callid(), t_lookup_ident(), t_lookup_request(), t_lookupOriginalT(), and t_reply_matching().
| static void init_branches | ( | struct cell * | t | ) | [inline, static] |
Definition at line 224 of file h_table.c.
References retr_buf::branch, retr_buf::fr_timer, ua_client::local_cancel, MAX_BRANCHES, retr_buf::my_T, ua_client::request, retr_buf::retr_timer, TG_FR, TG_RT, and cell::uac.
Referenced by build_cell().
| struct s_table* init_hash_table | ( | void | ) | [read] |
Definition at line 355 of file h_table.c.
References s_table::entrys, free_hash_table(), init_entry_lock(), LM_ERR, lock_initialize(), entry::next_label, shm_malloc(), and TM_TABLE_ENTRIES.
Referenced by mod_init().
| static void init_synonym_id | ( | struct cell * | t | ) | [inline, static] |
Definition at line 193 of file h_table.c.
References char_msg_val(), int2reverse_hex(), cell::md5, MD5_LEN, ua_server::request, syn_branch, and cell::uas.
Referenced by build_cell().
| void insert_into_hash_table_unsafe | ( | struct cell * | p_cell, | |
| unsigned int | _hash | |||
| ) |
Takes an already created cell and links it into hash table on the appropriate entry.
Definition at line 390 of file h_table.c.
References entry::acc_entries, entry::cur_entries, s_table::entrys, entry::first_cell, cell::hash_index, is_local, cell::label, entry::last_cell, cell::next_cell, entry::next_label, cell::prev_cell, and stats_trans_new.
Referenced by new_t(), t_uac(), and t_uac_cancel().
| void lock_hash | ( | int | i | ) |
| void remove_from_hash_table_unsafe | ( | struct cell * | p_cell | ) |
Un-link a cell from hash_table, but the cell itself is not released.
Definition at line 416 of file h_table.c.
References entry::cur_entries, s_table::entrys, entry::first_cell, cell::hash_index, if_update_stat, entry::last_cell, LM_CRIT, cell::next_cell, cell::prev_cell, tm_enable_stats, and tm_trans_inuse.
Referenced by t_uac(), t_uac_cancel(), and wait_handler().
| void reset_kr | ( | void | ) |
| void set_kr | ( | enum kill_reason | _kr | ) |
Definition at line 81 of file h_table.c.
References kr.
Referenced by _reply(), add_blind_uac(), load_tm(), t_forward_nonack(), t_lookup_request(), t_release_transaction(), and t_reply_with_body().
| unsigned int transaction_count | ( | void | ) |
Definition at line 110 of file h_table.c.
References entry::cur_entries, s_table::entrys, and TM_TABLE_ENTRIES.
| void unlock_hash | ( | int | i | ) |
enum kill_reason kr [static] |
| int syn_branch = 1 |
Definition at line 73 of file h_table.c.
Referenced by init_synonym_id(), t_calc_branch(), and t_reply_matching().
1.5.6