dlg_hash.c File Reference

#include <stdlib.h>
#include <string.h>
#include "../../dprint.h"
#include "../../ut.h"
#include "../../hash_func.h"
#include "../../mi/mi.h"
#include "dlg_timer.h"
#include "dlg_hash.h"
#include "dlg_profile.h"

Include dependency graph for dlg_hash.c:

Go to the source code of this file.

Defines

#define MAX_LDG_LOCKS   2048
#define MIN_LDG_LOCKS   2

Functions

struct dlg_cellbuild_new_dlg (str *callid, str *from_uri, str *to_uri, str *from_tag)
void destroy_dlg (struct dlg_cell *dlg)
void destroy_dlg_table (void)
int dlg_set_leg_info (struct dlg_cell *dlg, str *tag, str *rr, str *contact, str *cseq, unsigned int leg)
int dlg_update_cseq (struct dlg_cell *dlg, unsigned int leg, str *cseq)
struct dlg_cellget_dlg (str *callid, str *ftag, str *ttag, unsigned int *dir)
int init_dlg_table (unsigned int size)
static struct dlg_cellinternal_get_dlg (unsigned int h_entry, str *callid, str *ftag, str *ttag, unsigned int *dir)
static int internal_mi_print_dlg (struct mi_node *rpl, struct dlg_cell *dlg, int with_context)
static int internal_mi_print_dlgs (struct mi_node *rpl, int with_context)
void link_dlg (struct dlg_cell *dlg, int n)
static void log_next_state_dlg (const int event, const struct dlg_cell *dlg)
struct dlg_celllookup_dlg (unsigned int h_entry, unsigned int h_id)
int mi_print_dlg (struct mi_node *rpl, struct dlg_cell *dlg, int with_context)
struct mi_rootmi_print_dlgs (struct mi_root *cmd_tree, void *param)
struct mi_rootmi_print_dlgs_ctx (struct mi_root *cmd_tree, void *param)
void next_state_dlg (struct dlg_cell *dlg, int event, int *old_state, int *new_state, int *unref)
static struct mi_rootprocess_mi_params (struct mi_root *cmd_tree, struct dlg_cell **dlg_p)
void ref_dlg (struct dlg_cell *dlg, unsigned int cnt)
void unlink_unsafe_dlg (struct dlg_entry *d_entry, struct dlg_cell *dlg)
void unref_dlg (struct dlg_cell *dlg, unsigned int cnt)

Variables

struct dlg_tabled_table = 0


Define Documentation

#define MAX_LDG_LOCKS   2048

Definition at line 56 of file dlg_hash.c.

Referenced by init_dlg_table().

#define MIN_LDG_LOCKS   2

Definition at line 57 of file dlg_hash.c.

Referenced by init_dlg_table().


Function Documentation

struct dlg_cell* build_new_dlg ( str callid,
str from_uri,
str to_uri,
str from_tag 
) [read]

void destroy_dlg ( struct dlg_cell dlg  )  [inline]

void destroy_dlg_table ( void   ) 

int dlg_set_leg_info ( struct dlg_cell dlg,
str tag,
str rr,
str contact,
str cseq,
unsigned int  leg 
)

int dlg_update_cseq ( struct dlg_cell dlg,
unsigned int  leg,
str cseq 
)

Definition at line 281 of file dlg_hash.c.

References dlg_cell::cseq, _str::len, LM_DBG, LM_ERR, NULL, _str::s, shm_free, and shm_malloc().

Referenced by update_cseqs().

struct dlg_cell* get_dlg ( str callid,
str ftag,
str ttag,
unsigned int *  dir 
) [read]

Definition at line 382 of file dlg_hash.c.

References core_hash(), internal_get_dlg(), _str::len, LM_DBG, _str::s, and dlg_table::size.

Referenced by dlg_onroute(), and w_dlg_get().

int init_dlg_table ( unsigned int  size  ) 

static struct dlg_cell* internal_get_dlg ( unsigned int  h_entry,
str callid,
str ftag,
str ttag,
unsigned int *  dir 
) [static, read]

static int internal_mi_print_dlg ( struct mi_node rpl,
struct dlg_cell dlg,
int  with_context 
) [inline, static]

static int internal_mi_print_dlgs ( struct mi_node rpl,
int  with_context 
) [static]

void link_dlg ( struct dlg_cell dlg,
int  n 
)

static void log_next_state_dlg ( const int  event,
const struct dlg_cell dlg 
) [inline, static]

Small logging helper functions for next_state_dlg.

Parameters:
event logged event
dlg dialog data
See also:
next_state_dlg

Definition at line 473 of file dlg_hash.c.

References dlg_cell::callid, DLG_CALLEE_LEG, DLG_CALLER_LEG, dlg_cell::h_entry, dlg_cell::h_id, _str::len, LM_CRIT, _str::s, dlg_cell::state, and dlg_cell::tag.

Referenced by next_state_dlg().

struct dlg_cell* lookup_dlg ( unsigned int  h_entry,
unsigned int  h_id 
) [read]

int mi_print_dlg ( struct mi_node rpl,
struct dlg_cell dlg,
int  with_context 
)

Definition at line 750 of file dlg_hash.c.

References internal_mi_print_dlg().

Referenced by mi_profile_list().

struct mi_root* mi_print_dlgs ( struct mi_root cmd_tree,
void *  param 
) [read]

struct mi_root* mi_print_dlgs_ctx ( struct mi_root cmd_tree,
void *  param 
) [read]

void next_state_dlg ( struct dlg_cell dlg,
int  event,
int *  old_state,
int *  new_state,
int *  unref 
)

static struct mi_root* process_mi_params ( struct mi_root cmd_tree,
struct dlg_cell **  dlg_p 
) [static, read]

void ref_dlg ( struct dlg_cell dlg,
unsigned int  cnt 
)

void unlink_unsafe_dlg ( struct dlg_entry d_entry,
struct dlg_cell dlg 
) [inline]

Definition at line 425 of file dlg_hash.c.

References dlg_entry::first, dlg_entry::last, dlg_cell::next, and dlg_cell::prev.

void unref_dlg ( struct dlg_cell dlg,
unsigned int  cnt 
)


Variable Documentation

struct dlg_table* d_table = 0


Generated on Tue May 22 16:00:38 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6