Functions | Variables

dlg_timer.c File Reference

Timer related functions for the dialog moduleModule: dialog :: Kamailio dialog module. More...

#include "../../mem/shm_mem.h"
#include "../../timer.h"
#include "dlg_timer.h"
Include dependency graph for dlg_timer.c:

Go to the source code of this file.

Functions

Variables


Detailed Description

Definition in file dlg_timer.c.


Function Documentation

void dlg_timer_routine ( unsigned int  ticks,
void *  attr 
)
Parameters:
ticks time for expiration checks
attr unused

Definition at line 272 of file dlg_timer.c.

References get_expired_dlgs(), and timer_hdl.

Here is the call graph for this function:

static struct dlg_tl* get_expired_dlgs ( unsigned int  time  )  [static, read]
Parameters:
time time for expiration check
Returns:
list of expired dialogs on success, 0 on failure

Definition at line 223 of file dlg_timer.c.

References dlg_timer::first, dlg_timer::lock, and dlg_tl::timeout.

Referenced by dlg_timer_routine().

Here is the caller graph for this function:

int init_dlg_timer ( dlg_timer_handler  hdl  ) 

The global timer handler will be set on success.

Parameters:
hdl dialog timer handler
Returns:
0 on success, -1 on failure

Definition at line 51 of file dlg_timer.c.

References dlg_timer::first, dlg_timer::lock, and timer_hdl.

static void insert_dialog_timer_unsafe ( struct dlg_tl tl  )  [inline, static]
See also:
insert_dialog_timer
Parameters:
tl dialog timer list

Definition at line 105 of file dlg_timer.c.

References dlg_timer::first, and dlg_tl::timeout.

Referenced by insert_dlg_timer(), and update_dlg_timer().

Here is the caller graph for this function:

int insert_dlg_timer ( struct dlg_tl tl,
int  interval 
)
Parameters:
tl dialog timer list
interval timeout value in seconds
Returns:
0 on success, -1 when the input timer list is invalid

Definition at line 129 of file dlg_timer.c.

References insert_dialog_timer_unsafe(), dlg_timer::lock, and dlg_tl::timeout.

Referenced by dlg_onreply().

Here is the call graph for this function:

Here is the caller graph for this function:

int remove_dialog_timer ( struct dlg_tl tl  ) 
Parameters:
tl dialog timer that should be removed
Returns:
1 when the input timer is empty, 0 when the timer was removed, -1 when the input timer list is invalid

Definition at line 166 of file dlg_timer.c.

References dlg_timer::lock, remove_dialog_timer_unsafe(), and dlg_tl::timeout.

Referenced by destroy_dlg(), and dlg_onroute().

Here is the call graph for this function:

Here is the caller graph for this function:

static void remove_dialog_timer_unsafe ( struct dlg_tl tl  )  [inline, static]
Parameters:
tl dialog timer list
See also:
remove_dialog_timer

Definition at line 153 of file dlg_timer.c.

Referenced by remove_dialog_timer(), and update_dlg_timer().

Here is the caller graph for this function:

int update_dlg_timer ( struct dlg_tl tl,
int  timeout 
)
Parameters:
tl dialog timer
timeout new timeout value in seconds
Returns:
0 on success, -1 when the input list is invalid
Note:
the update is implemented as a remove, insert

Definition at line 199 of file dlg_timer.c.

References insert_dialog_timer_unsafe(), dlg_timer::lock, remove_dialog_timer_unsafe(), and dlg_tl::timeout.

Referenced by dlg_onroute().

Here is the call graph for this function:

Here is the caller graph for this function: