#include "../../mem/shm_mem.h"
#include "../../timer.h"
#include "dlg_timer.h"

Go to the source code of this file.
Functions | |
| void | destroy_dlg_timer (void) |
| Destroy global dialog timer. | |
| void | dlg_timer_routine (unsigned int ticks, void *attr) |
| Timer routine for expiration of dialogs Timer handler for expiration of dialogs, runs the global timer handler on them. | |
| static struct dlg_tl * | get_expired_dlgs (unsigned int time) |
| Helper function for dlg_timer_routine. | |
| int | init_dlg_timer (dlg_timer_handler hdl) |
| Initialize the dialog timer handler Initialize the dialog timer handler, allocate the lock and a global timer in shared memory. The global timer handler will be set on success. | |
| static void | insert_dialog_timer_unsafe (struct dlg_tl *tl) |
| Helper function for insert_dialog_timer. | |
| int | insert_dlg_timer (struct dlg_tl *tl, int interval) |
| Insert a dialog timer to the list. | |
| int | remove_dialog_timer (struct dlg_tl *tl) |
| Remove a dialog timer from the list. | |
| static void | remove_dialog_timer_unsafe (struct dlg_tl *tl) |
| Helper function for remove_dialog_timer. | |
| int | update_dlg_timer (struct dlg_tl *tl, int timeout) |
| Update a dialog timer on the list. | |
Variables | |
| struct dlg_timer * | d_timer = 0 |
| dlg_timer_handler | timer_hdl = 0 |
Module: dialog.
Definition in file dlg_timer.c.
| void destroy_dlg_timer | ( | void | ) |
Definition at line 89 of file dlg_timer.c.
References dlg_timer::lock, and shm_free.
Referenced by mod_destroy().
| void dlg_timer_routine | ( | unsigned int | ticks, | |
| void * | attr | |||
| ) |
Timer routine for expiration of dialogs Timer handler for expiration of dialogs, runs the global timer handler on them.
| time | for expiration checks | |
| attr | unused |
Definition at line 275 of file dlg_timer.c.
References get_expired_dlgs(), LM_DBG, dlg_tl::next, NULL, and timer_hdl.
Referenced by mod_init().
| static struct dlg_tl* get_expired_dlgs | ( | unsigned int | time | ) | [static, read] |
Helper function for dlg_timer_routine.
| time | time for expiration check |
Definition at line 226 of file dlg_timer.c.
References dlg_timer::first, LM_WARN, dlg_timer::lock, dlg_tl::next, dlg_tl::prev, and dlg_tl::timeout.
Referenced by dlg_timer_routine().
| int init_dlg_timer | ( | dlg_timer_handler | hdl | ) |
Initialize the dialog timer handler Initialize the dialog timer handler, allocate the lock and a global timer in shared memory. The global timer handler will be set on success.
Definition at line 53 of file dlg_timer.c.
References dlg_timer::first, LM_ERR, dlg_timer::lock, dlg_tl::next, dlg_tl::prev, shm_free, shm_malloc(), and timer_hdl.
Referenced by mod_init().
| static void insert_dialog_timer_unsafe | ( | struct dlg_tl * | tl | ) | [inline, static] |
Helper function for insert_dialog_timer.
Definition at line 107 of file dlg_timer.c.
References dlg_timer::first, LM_DBG, dlg_tl::next, dlg_tl::prev, and dlg_tl::timeout.
Referenced by insert_dlg_timer(), and update_dlg_timer().
| int insert_dlg_timer | ( | struct dlg_tl * | tl, | |
| int | interval | |||
| ) |
Insert a dialog timer to the list.
Definition at line 131 of file dlg_timer.c.
References get_ticks(), insert_dialog_timer_unsafe(), LM_CRIT, dlg_timer::lock, dlg_tl::next, dlg_tl::prev, and dlg_tl::timeout.
Referenced by dlg_onreply(), and load_dialog_info_from_db().
| int remove_dialog_timer | ( | struct dlg_tl * | tl | ) |
Remove a dialog timer from the list.
Definition at line 168 of file dlg_timer.c.
References LM_CRIT, dlg_timer::lock, dlg_tl::next, NULL, dlg_tl::prev, remove_dialog_timer_unsafe(), and dlg_tl::timeout.
Referenced by bye_reply_cb(), destroy_dlg(), and dlg_onroute().
| static void remove_dialog_timer_unsafe | ( | struct dlg_tl * | tl | ) | [inline, static] |
Helper function for remove_dialog_timer.
Definition at line 155 of file dlg_timer.c.
References dlg_tl::next, and dlg_tl::prev.
Referenced by remove_dialog_timer(), and update_dlg_timer().
| int update_dlg_timer | ( | struct dlg_tl * | tl, | |
| int | timeout | |||
| ) |
Update a dialog timer on the list.
Definition at line 201 of file dlg_timer.c.
References get_ticks(), insert_dialog_timer_unsafe(), dlg_timer::lock, dlg_tl::next, dlg_tl::prev, remove_dialog_timer_unsafe(), and dlg_tl::timeout.
Referenced by dlg_onroute().
Definition at line 43 of file dlg_timer.c.
Referenced by dlg_timer_routine(), and init_dlg_timer().
1.5.6