#include "../../lock_ops.h"


Go to the source code of this file.
Data Structures | |
| struct | pres_entry |
| struct | pres_htable |
| struct | subs_entry |
Defines | |
| #define | CONT_COPY(buf, dest, source) |
| #define | ERR_MEM(mem_type) |
| #define | LOCAL_TYPE 1<<2 |
| #define | PKG_MEM_STR "pkg" |
| #define | PKG_MEM_TYPE 1<< 1 |
| #define | REMOTE_TYPE 1<<1 |
| #define | SHARE_MEM "share" |
| #define | SHM_MEM_TYPE 1<< 2 |
Typedefs | |
| typedef int(* | delete_shtable_t )(shtable_t htable, unsigned int hash_code, str to_tag) |
| typedef void(* | destroy_shtable_t )(shtable_t htable, int hash_size) |
| typedef int(* | insert_shtable_t )(shtable_t htable, unsigned int hash_code, struct subscription *subs) |
| typedef struct subscription *(* | mem_copy_subs_t )(struct subscription *s, int mem_type) |
| typedef shtable_t(* | new_shtable_t )(int hash_size) |
| typedef struct pres_htable | phtable_t |
| typedef struct pres_entry | pres_entry_t |
| typedef struct subscription *(* | search_shtable_t )(shtable_t htable, str callid, str to_tag, str from_tag, unsigned int hash_code) |
| typedef subs_entry_t * | shtable_t |
| typedef struct subs_entry | subs_entry_t |
| typedef int(* | update_shtable_t )(shtable_t htable, unsigned int hash_code, struct subscription *subs, int type) |
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 (struct subscription *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, struct subscription *subs) |
| struct subscription * | mem_copy_subs (struct subscription *s, int mem_type) |
| 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) |
| struct subscription * | search_shtable (shtable_t htable, str callid, str to_tag, str from_tag, unsigned int hash_code) |
| int | update_phtable (struct presentity *presentity, str pres_uri, str body) |
| int | update_shtable (shtable_t htable, unsigned int hash_code, struct subscription *subs, int type) |
Definition in file presence/hash.h.
| #define CONT_COPY | ( | buf, | |||
| dest, | |||||
| source | ) |
Value:
dest.s= (char*)buf+ size;\ memcpy(dest.s, source.s, source.len);\ dest.len= source.len;\ size+= source.len;
Definition at line 52 of file presence/hash.h.
Referenced by mem_copy_subs(), mem_copy_subs_noc(), shm_copy_event(), subs_cbparam_indlg(), and subscribe_cbparam().
| #define ERR_MEM | ( | mem_type | ) |
Value:
LM_ERR("No more %s memory\n",mem_type);\ goto error
Definition at line 49 of file presence/hash.h.
Referenced by add_event(), add_resource_instance(), add_waiting_watchers(), agg_body_sendn_update(), agregate_xmls(), build_dlg_t(), constr_multipart_body(), constr_rlmi_doc(), CONSTR_RLSUBS_DID(), create_winfo_xml(), extract_sphere(), generate_ETag(), get_database_info(), get_db_subs_auth(), get_node_selector(), get_p_notify_body(), get_resource_list(), get_rules_doc(), get_sphere(), get_stored_info(), get_wi_notify_body(), get_xcap_etag(), get_xcap_path(), handle_publish(), insert_phtable(), mem_copy_subs(), mem_copy_subs_noc(), msg_presentity_clean(), new_phtable(), new_presentity(), new_shtable(), offline_nbody(), parse_subs_state(), publ_send200ok(), pxml_add_xcap_server(), register_xcapcb(), restore_db_subs(), rls_notify_dlg(), rls_notify_extra_hdr(), rls_send_notify(), send_2XX_reply(), shm_copy_event(), shm_copy_xcap_list(), subs_cback_func(), timer_send_notify(), update_rlsubs(), xcapInitNodeSel(), and xcapNodeSelAddStep().
| #define LOCAL_TYPE 1<<2 |
| #define PKG_MEM_STR "pkg" |
Definition at line 46 of file presence/hash.h.
Referenced by add_resource_instance(), add_waiting_watchers(), agg_body_sendn_update(), agregate_xmls(), build_dlg_t(), constr_multipart_body(), constr_rlmi_doc(), CONSTR_RLSUBS_DID(), create_winfo_xml(), extract_sphere(), generate_ETag(), get_database_info(), get_db_subs_auth(), get_node_selector(), get_p_notify_body(), get_resource_list(), get_rules_doc(), get_sphere(), get_stored_info(), get_wi_notify_body(), get_xcap_etag(), get_xcap_path(), handle_publish(), mem_copy_subs(), msg_presentity_clean(), new_presentity(), offline_nbody(), parse_subs_state(), publ_send200ok(), pxml_add_xcap_server(), rls_notify_dlg(), rls_notify_extra_hdr(), send_2XX_reply(), timer_send_notify(), update_rlsubs(), xcapInitNodeSel(), and xcapNodeSelAddStep().
| #define PKG_MEM_TYPE 1<< 1 |
Definition at line 58 of file presence/hash.h.
Referenced by add_event(), contains_event(), free_subs_list(), get_subs_db(), get_subs_dialog(), mem_copy_subs(), msg_presentity_clean(), pres_htable_restore(), publ_notify(), pxml_add_xcap_server(), query_db_notify(), refresh_watcher(), restore_db_subs(), timer_send_notify(), update_pw_dialogs(), and update_watchers_status().
| #define REMOTE_TYPE 1<<1 |
Definition at line 43 of file presence/hash.h.
Referenced by update_shtable(), update_subs_db(), and update_subscription().
| #define SHARE_MEM "share" |
Definition at line 47 of file presence/hash.h.
Referenced by add_event(), insert_phtable(), mem_copy_subs(), mem_copy_subs_noc(), new_phtable(), new_shtable(), register_xcapcb(), rls_send_notify(), shm_copy_event(), shm_copy_xcap_list(), and subs_cback_func().
| #define SHM_MEM_TYPE 1<< 2 |
Definition at line 59 of file presence/hash.h.
Referenced by destroy_shtable(), free_event_params(), free_xs_list(), shm_copy_xcap_list(), and shm_free_event().
| typedef int(* delete_shtable_t)(shtable_t htable, unsigned int hash_code, str to_tag) |
Definition at line 99 of file presence/hash.h.
| typedef void(* destroy_shtable_t)(shtable_t htable, int hash_size) |
Definition at line 105 of file presence/hash.h.
| typedef int(* insert_shtable_t)(shtable_t htable, unsigned int hash_code, struct subscription *subs) |
Definition at line 96 of file presence/hash.h.
| typedef struct subscription*(* mem_copy_subs_t)(struct subscription *s, int mem_type) |
Definition at line 107 of file presence/hash.h.
| typedef shtable_t(* new_shtable_t)(int hash_size) |
Definition at line 91 of file presence/hash.h.
| typedef struct pres_htable phtable_t |
| typedef struct pres_entry pres_entry_t |
| typedef struct subscription*(* search_shtable_t)(shtable_t htable, str callid, str to_tag, str from_tag, unsigned int hash_code) |
Definition at line 93 of file presence/hash.h.
| typedef subs_entry_t* shtable_t |
Definition at line 70 of file presence/hash.h.
| typedef struct subs_entry subs_entry_t |
| typedef int(* update_shtable_t)(shtable_t htable, unsigned int hash_code, struct subscription *subs, int type) |
Definition at line 102 of file presence/hash.h.
| 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 | ( | struct subscription * | 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().
| int insert_shtable | ( | shtable_t | htable, | |
| unsigned int | hash_code, | |||
| struct subscription * | subs | |||
| ) |
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().
| struct subscription* mem_copy_subs | ( | struct subscription * | s, | |
| int | mem_type | |||
| ) | [read] |
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().
| 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().
| struct subscription* 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 | ( | struct presentity * | 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().
| int update_shtable | ( | shtable_t | htable, | |
| unsigned int | hash_code, | |||
| struct subscription * | subs, | |||
| int | type | |||
| ) |
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