
Go to the source code of this file.
Defines | |
| #define | HASHTABLEBITS 13 |
| #define | HASHTABLEMASK (HASHTABLESIZE - 1) |
| #define | HASHTABLESIZE (((unsigned int)1) << HASHTABLEBITS) |
| #define | MAXCALLIDLEN 255 |
Functions | |
| void | ring_destroy_hashtable (void) |
| Destroy the ring hashtable. | |
| int | ring_filter (struct sip_msg *msg, void *bar) |
| Callback function that does the work inside the server. | |
| int | ring_fixup (void **param, int param_no) |
| Fixup function for the ring_insert_callid function. | |
| void | ring_init_hashtable (void) |
| Initialize the ring hashtable in shared memory. | |
| int | ring_insert_callid (struct sip_msg *msg, char *unused1, char *unused2) |
| Inserts callid of message into hashtable. | |
Variables | |
| gen_lock_t * | ring_lock |
| unsigned int | ring_timeout |
Definition in file ring.h.
| #define HASHTABLEMASK (HASHTABLESIZE - 1) |
| #define HASHTABLESIZE (((unsigned int)1) << HASHTABLEBITS) |
Definition at line 35 of file ring.h.
Referenced by ring_destroy_hashtable(), and ring_init_hashtable().
| void ring_destroy_hashtable | ( | void | ) |
Destroy the ring hashtable.
Definition at line 127 of file ring.c.
References hashtable, HASHTABLESIZE, hashtable_entry_t::head, ring_record_t::next, NULL, and shm_free.
Referenced by mod_destroy().
| int ring_filter | ( | struct sip_msg * | msg, | |
| void * | bar | |||
| ) |
Callback function that does the work inside the server.
| msg | SIP message | |
| bar | unused |
Definition at line 323 of file ring.c.
References hdr_field::body, sip_msg::callid, contains(), conv183(), sip_msg::first_line, HDR_CALLID_F, _str::len, LM_DBG, LM_ERR, parse_headers(), msg_start::reply, ring_lock, _str::s, SIP_REPLY, msg_start::type, and msg_start::u.
Referenced by mod_init().
| int ring_fixup | ( | void ** | param, | |
| int | param_no | |||
| ) |
Fixup function for the ring_insert_callid function.
| param | unused | |
| param_no | unused |
Definition at line 356 of file ring.c.
References LM_ERR, and ring_timeout.
| void ring_init_hashtable | ( | void | ) |
Initialize the ring hashtable in shared memory.
Definition at line 111 of file ring.c.
References hashtable, HASHTABLESIZE, NULL, and shm_malloc().
Referenced by mod_init().
| int ring_insert_callid | ( | struct sip_msg * | msg, | |
| char * | unused1, | |||
| char * | unused2 | |||
| ) |
Inserts callid of message into hashtable.
Inserts callid of message into hashtable. Any 183 messages with this callid that occur in the next ring_timeout seconds, will be converted to 180.
| msg | SIP message | |
| unused1 | unused | |
| unused2 | unused |
Definition at line 90 of file ring.c.
References hdr_field::body, sip_msg::callid, contains(), HDR_CALLID_F, insert(), LM_ERR, parse_headers(), and ring_lock.
| gen_lock_t* ring_lock |
Definition at line 57 of file siputils.c.
Referenced by mod_destroy(), mod_init(), ring_filter(), and ring_insert_callid().
| unsigned int ring_timeout |
Definition at line 58 of file siputils.c.
Referenced by mod_init(), remove_timeout(), and ring_fixup().
1.5.6