#include <stdio.h>
#include <stdlib.h>
#include "../../mem/shm_mem.h"
#include "../../dprint.h"
#include "../../str.h"
#include "../pua/hash.h"
#include "presence.h"
#include "hash.h"
#include "notify.h"

Go to the source code of this file.
Functions | |
| int | delete_phtable (str *pres_uri, int event) |
| int | delete_shtable (shtable_t htable, unsigned int hash_code, str to_tag) |
| void | destroy_phtable (void) |
| void | destroy_shtable (shtable_t htable, int hash_size) |
| void | free_subs_list (subs_t *s_array, int mem_type, int ic) |
| int | insert_phtable (str *pres_uri, int event, char *sphere) |
| int | insert_shtable (shtable_t htable, unsigned int hash_code, subs_t *subs) |
| subs_t * | mem_copy_subs (subs_t *s, int mem_type) |
| subs_t * | mem_copy_subs_noc (subs_t *s) |
| phtable_t * | new_phtable (void) |
| shtable_t | new_shtable (int hash_size) |
| pres_entry_t * | search_phtable (str *pres_uri, int event, unsigned int hash_code) |
| subs_t * | search_shtable (shtable_t htable, str callid, str to_tag, str from_tag, unsigned int hash_code) |
| int | update_phtable (presentity_t *presentity, str pres_uri, str body) |
| int | update_shtable (shtable_t htable, unsigned int hash_code, subs_t *subs, int type) |
Definition in file presence/hash.c.
| int delete_phtable | ( | str * | pres_uri, | |
| int | event | |||
| ) |
Definition at line 534 of file presence/hash.c.
References core_hash(), LM_DBG, LM_ERR, lock, pres_entry::next, NULL, phtable_size, pres_entry::publ_count, search_phtable(), shm_free, and pres_entry::sphere.
Referenced by msg_presentity_clean(), and update_presentity().
Definition at line 281 of file presence/hash.c.
References subscription::contact, subs_entry::entries, _str::len, subscription::local_cseq, lock, subscription::next, NULL, _str::s, s, shm_free, and subscription::to_tag.
Referenced by bind_presence(), p_tm_callback(), and update_subscription().
| void destroy_phtable | ( | void | ) |
Definition at line 436 of file presence/hash.c.
References lock, pres_entry::next, NULL, phtable_size, shm_free, and pres_entry::sphere.
| void destroy_shtable | ( | shtable_t | htable, | |
| int | hash_size | |||
| ) |
Definition at line 89 of file presence/hash.c.
References free_subs_list(), lock, NULL, shm_free, and SHM_MEM_TYPE.
Referenced by bind_presence().
| void free_subs_list | ( | subs_t * | s_array, | |
| int | mem_type, | |||
| int | ic | |||
| ) |
Definition at line 310 of file presence/hash.c.
References subscription::contact, subscription::next, pkg_free, PKG_MEM_TYPE, _str::s, s, and shm_free.
Referenced by destroy_shtable(), get_subs_dialog(), publ_notify(), query_db_notify(), and update_watchers_status().
| int insert_phtable | ( | str * | pres_uri, | |
| int | event, | |||
| char * | sphere | |||
| ) |
Definition at line 477 of file presence/hash.c.
References core_hash(), ERR_MEM, pres_entry::event, _str::len, lock, pres_entry::next, NULL, phtable_size, pres_entry::pres_uri, pres_entry::publ_count, _str::s, search_phtable(), SHARE_MEM, shm_malloc(), and pres_entry::sphere.
Referenced by pres_htable_restore(), and update_presentity().
Definition at line 251 of file presence/hash.c.
References subscription::db_flag, subs_entry::entries, subscription::expires, INSERTDB_FLAG, LM_ERR, lock, mem_copy_subs_noc(), subscription::next, NULL, and shm_free.
Referenced by bind_presence(), restore_db_subs(), and update_subscription().
Definition at line 128 of file presence/hash.c.
References subscription::callid, CONT_COPY, subscription::contact, subscription::db_flag, ERR_MEM, subscription::event, subscription::event_id, subscription::expires, subscription::from_domain, subscription::from_tag, subscription::from_user, _str::len, subscription::local_contact, subscription::local_cseq, NULL, pkg_free, pkg_malloc, PKG_MEM_STR, PKG_MEM_TYPE, subscription::pres_uri, subscription::reason, subscription::record_route, subscription::remote_cseq, _str::s, subscription::send_on_cback, SHARE_MEM, shm_free, shm_malloc(), subscription::sockinfo_str, subscription::status, subscription::to_domain, subscription::to_tag, subscription::to_user, and subscription::version.
Referenced by bind_presence(), get_subs_db(), get_subs_dialog(), refresh_watcher(), and update_pw_dialogs().
Definition at line 191 of file presence/hash.c.
References subscription::callid, CONT_COPY, subscription::contact, subscription::db_flag, ERR_MEM, subscription::event, subscription::event_id, subscription::expires, subscription::from_domain, subscription::from_tag, subscription::from_user, _str::len, subscription::local_contact, subscription::local_cseq, NULL, subscription::pres_uri, subscription::reason, subscription::record_route, subscription::remote_cseq, _str::s, subscription::send_on_cback, SHARE_MEM, shm_free, shm_malloc(), subscription::sockinfo_str, subscription::status, subscription::to_domain, subscription::to_tag, subscription::to_user, and subscription::version.
Referenced by insert_shtable().
| phtable_t* new_phtable | ( | void | ) |
Definition at line 388 of file presence/hash.c.
References pres_htable::entries, ERR_MEM, LM_ERR, lock, pres_entry::next, NULL, phtable_size, SHARE_MEM, shm_free, and shm_malloc().
Referenced by mod_init().
| shtable_t new_shtable | ( | int | hash_size | ) |
Definition at line 44 of file presence/hash.c.
References subs_entry::entries, ERR_MEM, LM_ERR, lock, subscription::next, NULL, SHARE_MEM, shm_free, and shm_malloc().
Referenced by bind_presence(), and mod_init().
| pres_entry_t* search_phtable | ( | str * | pres_uri, | |
| int | event, | |||
| unsigned int | hash_code | |||
| ) |
Definition at line 461 of file presence/hash.c.
References pres_entry::event, _str::len, LM_DBG, pres_entry::next, NULL, pres_entry::pres_uri, and _str::s.
Referenced by delete_phtable(), get_p_notify_body(), get_sphere(), insert_phtable(), and update_phtable().
| subs_t* search_shtable | ( | shtable_t | htable, | |
| str | callid, | |||
| str | to_tag, | |||
| str | from_tag, | |||
| unsigned int | hash_code | |||
| ) | [read] |
Definition at line 106 of file presence/hash.c.
References subscription::callid, subs_entry::entries, subscription::from_tag, _str::len, subscription::next, NULL, _str::s, s, and subscription::to_tag.
Referenced by bind_presence(), get_stored_info(), and update_shtable().
| int update_phtable | ( | presentity_t * | presentity, | |
| str | pres_uri, | |||
| str | body | |||
| ) |
Definition at line 579 of file presence/hash.c.
References core_hash(), presentity::domain, presentity::event, pres_ev::evp, extract_sphere(), pres_ev::get_rules_doc, LM_DBG, LM_ERR, lock, NULL, event::parsed, phtable_size, pkg_free, _str::s, search_phtable(), shm_free, shm_malloc(), pres_entry::sphere, update_watchers_status(), and presentity::user.
Referenced by update_presentity().
Definition at line 334 of file presence/hash.c.
References subscription::callid, subscription::contact, subscription::db_flag, subscription::event, subscription::expires, subscription::from_tag, _str::len, LM_DBG, LM_ERR, subscription::local_cseq, lock, NO_UPDATEDB_FLAG, NULL, subscription::remote_cseq, REMOTE_TYPE, _str::s, s, search_shtable(), shm_free, shm_malloc(), subscription::status, subscription::to_tag, UPDATEDB_FLAG, and subscription::version.
Referenced by bind_presence(), notify(), and update_subscription().
1.5.6