#include <stdio.h>#include <string.h>#include <stdlib.h>#include <sys/types.h>#include <sys/ipc.h>#include <unistd.h>#include <fcntl.h>#include <time.h>#include "../../pt.h"#include "../../db/db.h"#include "../../sr_module.h"#include "../../dprint.h"#include "../../error.h"#include "../../ut.h"#include "../../mem/mem.h"#include "../../mem/shm_mem.h"#include "../tm/tm_load.h"#include "../sl/sl_api.h"#include "../presence/bind_presence.h"#include "../presence/hash.h"#include "../pua/pua_bind.h"#include "../pua/pidf.h"#include "../xcap_client/xcap_functions.h"#include "rls.h"#include "notify.h"#include "resource_notify.h"

Go to the source code of this file.
| #define W_TABLE_VERSION 1 |
| int add_rls_event | ( | modparam_t | type, | |
| void * | val | |||
| ) |
Definition at line 709 of file rls.c.
References EVENT_OTHER, event_parser(), LM_ERR, event::parsed, and rls_events.
| static int child_init | ( | int | rank | ) | [static] |
Initialize children
Definition at line 454 of file rls.c.
References db_func::init, LM_CRIT, LM_DBG, LM_ERR, my_pid(), pid, and db_func::use_table.
| void destroy | ( | void | ) |
| int handle_expired_record | ( | subs_t * | s | ) |
Definition at line 506 of file rls.c.
References LM_ERR, NULL, and rls_send_notify().
Referenced by rlsubs_table_update().
| static int mod_init | ( | void | ) | [static] |
module functions
init module function
Definition at line 207 of file rls.c.
References bind_presence(), bind_pua(), bind_xcap(), clean_period, db_func::close, presence_api::contains_event, db_bind_mod(), DB_CAP_ALL, DB_CAPABILITY, db_check_table_version(), presence_api::delete_shtable, presence_api::destroy_shtable, presence_api::extract_sdialog_info, find_export(), presence_api::get_event_list, pua_api::get_record_id, xcap_api::getNewDoc, hash_size, db_func::init, presence_api::insert_shtable, _str::len, LM_DBG, LM_ERR, load_sl_api(), load_tm_api(), presence_api::mem_copy_subs, presence_api::new_shtable, NULL, P_TABLE_VERSION, pres_contains_event, pres_copy_subs, pres_delete_shtable, pres_destroy_shtable, pres_extract_sdialog_info, pres_get_ev_list, pres_insert_shtable, pres_new_shtable, pres_search_event, pres_search_shtable, pres_update_db_subs, pres_update_shtable, pua, pua_get_record_id, pua_send_subscribe, register_timer(), rls_integrated_xcap_server, rls_presentity_clean(), rls_restore_db_subs(), rlsubs_table_update(), _str::s, presence_api::search_event, presence_api::search_shtable, pua_api::send_subscribe, slb, str2int(), timer_send_notify(), tmb, presence_api::update_db_subs, presence_api::update_shtable, W_TABLE_VERSION, waitn_time, xcap_GetNewDoc, xcap_port, xcap_root, libxml_api::xmlDocGetNodeByName, XMLDocGetNodeByName, libxml_api::xmlNodeGetAttrContentByName, XMLNodeGetAttrContentByName, libxml_api::xmlNodeGetNodeByName, XMLNodeGetNodeByName, libxml_api::xmlNodeGetNodeContentByName, XMLNodeGetNodeContentByName, and ZSW.
| int rls_handle_subscribe | ( | struct sip_msg * | , | |
| char * | , | |||
| char * | ||||
| ) |
Definition at line 330 of file rls/subscribe.c.
| int rls_restore_db_subs | ( | void | ) |
Definition at line 535 of file rls.c.
References subscription::callid, callid_col, subscription::contact, contact_col, core_hash(), db_func::delete, subscription::event, subscription::event_id, subscription::expires, expires_col, db_func::free_result, subscription::from_domain, subscription::from_tag, subscription::from_user, hash_size, db_val_t::int_val, _str::len, LM_DBG, LM_ERR, LM_INFO, subscription::local_contact, subscription::local_cseq, db_res::n, pres_ev::name, NULL, pres_contains_event, pres_insert_shtable, subscription::pres_uri, db_func::query, subscription::reason, reason_col, subscription::record_route, subscription::remote_cseq, ROW_VALUES, db_res::rows, _str::s, s, subscription::sockinfo_str, subscription::status, db_val_t::string_val, subscription::to_domain, subscription::to_tag, subscription::to_user, db_func::use_table, db_val_t::val, and subscription::version.
Referenced by mod_init().
| int rlsubs_table_restore | ( | ) |
| void rlsubs_table_update | ( | unsigned int | ticks, | |
| void * | param | |||
| ) |
Definition at line 518 of file rls.c.
References handle_expired_record(), hash_size, LM_ERR, NULL, pres_update_db_subs, and db_func::use_table.
Referenced by mod_init().
| int clean_period = 100 |
cmd_export_t cmds[] [static] |
| struct module_exports exports |
| int hash_size = 512 |
Definition at line 74 of file rls.c.
Referenced by mod_init(), rls_handle_subscribe(), rls_notify_callback(), rls_restore_db_subs(), rlsubs_table_update(), and timer_send_notify().
param_export_t params[] [static] |
Definition at line 94 of file rls.c.
Referenced by mod_init(), rls_handle_subscribe(), and rls_restore_db_subs().
Definition at line 95 of file rls.c.
Referenced by mod_init(), rls_handle_subscribe(), timer_send_notify(), and update_rlsubs().
| str rlpres_table = str_init("rls_presentity") |
Definition at line 70 of file rls.c.
Referenced by rls_handle_notify(), rls_presentity_clean(), send_full_notify(), and timer_send_notify().
database connection
Definition at line 63 of file rls.c.
Referenced by get_resource_list(), rls_handle_notify(), rls_notify_callback(), rls_presentity_clean(), send_full_notify(), and timer_send_notify().
Definition at line 64 of file rls.c.
Referenced by get_resource_list(), rls_handle_notify(), rls_notify_callback(), rls_presentity_clean(), send_full_notify(), and timer_send_notify().
| int rls_events = EVENT_PRESENCE |
| int rls_integrated_xcap_server = 0 |
| int rls_max_expires = 7200 |
Definition at line 75 of file rls.c.
Referenced by agg_body_sendn_update(), rls_handle_subscribe(), rls_notify_callback(), timer_send_notify(), and update_rlsubs().
| str rls_xcap_table = str_init("xcap") |
| str rlsubs_table = str_init("rls_watchers") |
| str server_address = {0, 0} |
| str str_auth_state_col = str_init("auth_state") |
Definition at line 121 of file rls.c.
Referenced by rls_handle_notify(), send_full_notify(), and timer_send_notify().
| str str_callid_col = str_init("callid") |
| str str_contact_col = str_init("contact") |
| str str_content_type_col = str_init("content_type") |
Definition at line 123 of file rls.c.
Referenced by rls_handle_notify(), send_full_notify(), and timer_send_notify().
| str str_doc_col = str_init("doc") |
| str str_doc_type_col = str_init("doc_type") |
| str str_domain_col = str_init("domain") |
| str str_etag_col = str_init("etag") |
| str str_event_col = str_init("event") |
| str str_event_id_col = str_init("event_id") |
| str str_expires_col = str_init("expires") |
| str str_from_tag_col = str_init("from_tag") |
| str str_local_contact_col = str_init("local_contact") |
| str str_local_cseq_col = str_init("local_cseq") |
| str str_presence_state_col = str_init("presence_state") |
Definition at line 124 of file rls.c.
Referenced by rls_handle_notify(), send_full_notify(), and timer_send_notify().
| str str_presentity_uri_col = str_init("presentity_uri") |
| str str_reason_col = str_init("reason") |
| str str_record_route_col = str_init("record_route") |
| str str_remote_cseq_col = str_init("remote_cseq") |
| str str_resource_uri_col = str_init("resource_uri") |
Definition at line 119 of file rls.c.
Referenced by rls_handle_notify(), send_full_notify(), and timer_send_notify().
| str str_rlsubs_did_col = str_init("rlsubs_did") |
Definition at line 118 of file rls.c.
Referenced by rls_handle_notify(), send_full_notify(), and timer_send_notify().
| str str_socket_info_col = str_init("socket_info") |
| str str_status_col = str_init("status") |
| str str_to_domain_col = str_init("to_domain") |
| str str_to_tag_col = str_init("to_tag") |
| str str_to_user_col = str_init("to_user") |
| str str_updated_col = str_init("updated") |
Definition at line 120 of file rls.c.
Referenced by rls_handle_notify(), send_full_notify(), and timer_send_notify().
| str str_username_col = str_init("username") |
| str str_version_col = str_init("version") |
| str str_watcher_domain_col = str_init("watcher_domain") |
| str str_watcher_username_col = str_init("watcher_username") |
| int to_presence_code = 1 |
| int waitn_time = 10 |
| unsigned int xcap_port = 8000 |
Definition at line 82 of file rls.c.
Referenced by get_resource_list(), mod_init(), and refreshXcapDoc().
| char* xcap_root |
1.5.6