#include <stdio.h>#include <stdlib.h>#include <string.h>#include "../../mem/mem.h"#include "../../mem/shm_mem.h"#include "../../dprint.h"#include "../../hash_func.h"#include "../../parser/msg_parser.h"#include "../../parser/parse_from.h"#include "hash.h"#include "pua.h"#include "send_publish.h"

Go to the source code of this file.
Functions | |
| void | delete_htable (ua_pres_t *presentity, unsigned int hash_code) |
| void | destroy_htable (void) |
| ua_pres_t * | get_dialog (ua_pres_t *dialog, unsigned int hash_code) |
| int | get_record_id (ua_pres_t *dialog, str **rec_id) |
| void | insert_htable (ua_pres_t *presentity) |
| int | is_dialog (ua_pres_t *dialog) |
| htable_t * | new_htable (void) |
| void | print_ua_pres (ua_pres_t *p) |
| ua_pres_t * | search_htable (ua_pres_t *pres, unsigned int hash_code) |
| int | update_contact (struct sip_msg *msg, char *str1, char *str2) |
| void | update_htable (ua_pres_t *p, time_t desired_expires, int expires, str *etag, unsigned int hash_code, str *contact) |
| void delete_htable | ( | ua_pres_t * | presentity, | |
| unsigned int | hash_code | |||
| ) |
Definition at line 244 of file pua/hash.c.
References hash_entry::entity, ua_pres::etag, HashT, ua_pres::next, NULL, htable::p_records, ua_pres::remote_contact, _str::s, search_htable(), and shm_free.
Referenced by hashT_clean(), publ_cback_func(), and subs_cback_func().
| void destroy_htable | ( | void | ) |
Definition at line 269 of file pua/hash.c.
References hash_entry::entity, HASH_SIZE, HashT, hash_entry::lock, ua_pres::next, NULL, htable::p_records, and shm_free.
Definition at line 300 of file pua/hash.c.
References ua_pres::call_id, hash_entry::entity, ua_pres::flag, ua_pres::from_tag, HashT, _str::len, LM_DBG, ua_pres::next, NULL, htable::p_records, ua_pres::pres_uri, _str::s, ua_pres::to_tag, and ua_pres::watcher_uri.
Referenced by get_record_id(), is_dialog(), subs_cback_func(), and update_contact().
Definition at line 338 of file pua/hash.c.
References core_hash(), get_dialog(), HASH_SIZE, HashT, ua_pres::id, id, _str::len, LM_DBG, LM_ERR, hash_entry::lock, NULL, htable::p_records, pkg_free, pkg_malloc, ua_pres::pres_uri, _str::s, and ua_pres::watcher_uri.
Referenced by bind_pua().
| void insert_htable | ( | ua_pres_t * | presentity | ) |
Definition at line 215 of file pua/hash.c.
References core_hash(), ua_pres::db_flag, hash_entry::entity, HASH_SIZE, HashT, INSERTDB_FLAG, hash_entry::lock, ua_pres::next, NULL, htable::p_records, ua_pres::pres_uri, and ua_pres::watcher_uri.
Referenced by db_restore(), publ_cback_func(), and subs_cback_func().
| int is_dialog | ( | ua_pres_t * | dialog | ) |
Definition at line 383 of file pua/hash.c.
References core_hash(), get_dialog(), HASH_SIZE, HashT, hash_entry::lock, NULL, htable::p_records, ua_pres::pres_uri, and ua_pres::watcher_uri.
Referenced by bind_pua(), and update_presentity().
| htable_t* new_htable | ( | void | ) |
Definition at line 61 of file pua/hash.c.
References hash_entry::entity, H, HASH_SIZE, LM_CRIT, LM_ERR, hash_entry::lock, ua_pres::next, NULL, htable::p_records, shm_free, and shm_malloc().
Referenced by mod_init().
| void print_ua_pres | ( | ua_pres_t * | p | ) |
Definition at line 40 of file pua/hash.c.
References ua_pres::call_id, ua_pres::etag, ua_pres::event, ua_pres::expires, ua_pres::flag, ua_pres::from_tag, ua_pres::id, _str::len, LM_DBG, NULL, ua_pres::pres_uri, _str::s, ua_pres::to_tag, and ua_pres::watcher_uri.
Referenced by db_restore(), and hashT_clean().
Definition at line 116 of file pua/hash.c.
References hash_entry::entity, ua_pres::etag, ua_pres::event, ua_pres::flag, HashT, ua_pres::id, _str::len, LM_DBG, ua_pres::next, NULL, htable::p_records, ua_pres::pres_uri, ua_pres::remote_contact, _str::s, and ua_pres::watcher_uri.
Referenced by delete_htable(), publ_cback_func(), send_publish(), and send_subscribe().
| int update_contact | ( | struct sip_msg * | msg, | |
| char * | str1, | |||
| char * | str2 | |||
| ) |
Definition at line 401 of file pua/hash.c.
References hdr_field::body, ua_pres::call_id, sip_msg::callid, sip_msg::contact, core_hash(), sip_msg::from, ua_pres::from_tag, get_dialog(), HASH_SIZE, HashT, HDR_EOH_F, _str::len, LM_DBG, LM_ERR, hash_entry::lock, NULL, htable::p_records, parse_from_header(), parse_headers(), parse_to(), hdr_field::parsed, ua_pres::pres_uri, ua_pres::remote_contact, _str::s, shm_free, shm_malloc(), to_body::tag_value, sip_msg::to, TO, ua_pres::to_tag, to_body::uri, and ua_pres::watcher_uri.
| void update_htable | ( | ua_pres_t * | p, | |
| time_t | desired_expires, | |||
| int | expires, | |||
| str * | etag, | |||
| unsigned int | hash_code, | |||
| str * | contact | |||
| ) |
Definition at line 176 of file pua/hash.c.
References ua_pres::cseq, ua_pres::db_flag, ua_pres::desired_expires, ua_pres::etag, ua_pres::expires, _str::len, LM_ERR, NO_UPDATEDB_FLAG, NULL, ua_pres::remote_contact, _str::s, shm_free, shm_malloc(), UPDATEDB_FLAG, and ua_pres::watcher_uri.
Referenced by publ_cback_func(), and subs_cback_func().
1.5.6