#include <stdlib.h>#include <stdio.h>#include <string.h>#include <time.h>#include "../../ut.h"#include "../../str.h"#include "../../dprint.h"#include "../../data_lump_rpl.h"#include "../../parser/msg_parser.h"#include "../../parser/parse_event.h"#include "../../parser/parse_expires.h"#include "../../parser/parse_cseq.h"#include "../../parser/contact/parse_contact.h"#include "../../parser/parse_rr.h"#include "../tm/dlg.h"#include "../presence/utils_func.h"#include "../presence/hash.h"#include "rls.h"#include "notify.h"

Go to the source code of this file.
Data Structures | |
| struct | res_param |
Typedefs | |
| typedef struct res_param | res_param_t |
Functions | |
| int | add_resource (char *uri, void *param) |
| int | add_resource_instance (char *uri, xmlNodePtr resource_node, db_res_t *result, char **cid_array) |
| int | agg_body_sendn_update (str *rl_uri, char *boundary_string, str *rlmi_body, str *multipart_body, subs_t *subs, unsigned int hash_code) |
| str * | constr_multipart_body (db_res_t *result, char **cid_array, char *boundary_string) |
| str * | constr_rlmi_doc (db_res_t *result, str *rl_uri, int version, xmlNodePtr rl_node, char ***cid_array) |
| char * | generate_cid (char *uri, int uri_len) |
| char * | generate_string (int seed, int length) |
| char * | get_auth_string (int flag) |
| int | process_list_and_exec (xmlNodePtr list_node, list_func_t function, void *param) |
| void | rls_free_td (dlg_t *td) |
| void | rls_notify_callback (struct cell *t, int type, struct tmcb_params *ps) |
| dlg_t * | rls_notify_dlg (subs_t *subs) |
| str * | rls_notify_extra_hdr (subs_t *subs, char *start_cid, char *boundary_string) |
| int | rls_send_notify (subs_t *subs, str *body, char *start_cid, char *boundary_string) |
| int | send_full_notify (subs_t *subs, xmlNodePtr rl_node, int version, str *rl_uri, unsigned int hash_code) |
Variables | |
| int | auth_state_col = 0 |
| int | content_type_col |
| int | pres_state_col = 0 |
| int | reason_col = 0 |
| int | resource_uri_col = 0 |
| typedef struct res_param res_param_t |
| int add_resource | ( | char * | uri, | |
| void * | param | |||
| ) |
Definition at line 353 of file rls/notify.c.
References add_resource_instance(), LM_DBG, LM_ERR, and NULL.
Referenced by constr_rlmi_doc().
| int add_resource_instance | ( | char * | uri, | |
| xmlNodePtr | resource_node, | |||
| db_res_t * | result, | |||
| char ** | cid_array | |||
| ) |
Definition at line 279 of file rls/notify.c.
References ACTIVE_STATE, auth_state_col, ERR_MEM, generate_cid(), generate_string(), get_auth_string(), db_val_t::int_val, _str::len, LM_ERR, db_res::n, NULL, pkg_malloc, PKG_MEM_STR, reason_col, resource_uri_col, ROW_VALUES, db_res::rows, _str::s, db_val_t::string_val, TERMINATED_STATE, and db_val_t::val.
Referenced by add_resource().
| int agg_body_sendn_update | ( | str * | rl_uri, | |
| char * | boundary_string, | |||
| str * | rlmi_body, | |||
| str * | multipart_body, | |||
| subs_t * | subs, | |||
| unsigned int | hash_code | |||
| ) |
Definition at line 208 of file rls/notify.c.
References ERR_MEM, generate_cid(), _str::len, len, LM_ERR, LOCAL_TYPE, NULL, pkg_free, pkg_malloc, PKG_MEM_STR, pres_update_shtable, rls_send_notify(), rls_table, and _str::s.
Referenced by send_full_notify(), and timer_send_notify().
Definition at line 461 of file rls/notify.c.
References ACTIVE_STATE, auth_state_col, buf, BUF_REALLOC_SIZE, COMPUTE_ANTET_LEN, content_type_col, ERR_MEM, db_val_t::int_val, _str::len, LM_DBG, LM_ERR, db_res::n, NULL, pkg_free, pkg_malloc, PKG_MEM_STR, pres_state_col, REALLOC_BUF, resource_uri_col, ROW_VALUES, db_res::rows, _str::s, and db_val_t::string_val.
Referenced by send_full_notify().
| str * constr_rlmi_doc | ( | db_res_t * | result, | |
| str * | rl_uri, | |||
| int | version, | |||
| xmlNodePtr | rl_node, | |||
| char *** | cid_array | |||
| ) |
Definition at line 380 of file rls/notify.c.
References add_resource(), res_param::cid_array, res_param::db_result, ERR_MEM, int2str(), _str::len, len, res_param::list_node, LM_DBG, LM_ERR, db_res::n, NULL, pkg_free, pkg_malloc, PKG_MEM_STR, process_list_and_exec(), and _str::s.
Referenced by send_full_notify().
| char* generate_cid | ( | char * | uri, | |
| int | uri_len | |||
| ) |
Definition at line 917 of file rls/notify.c.
Referenced by add_resource_instance(), agg_body_sendn_update(), and timer_send_notify().
| char* generate_string | ( | int | seed, | |
| int | length | |||
| ) |
Definition at line 892 of file rls/notify.c.
References buf, LM_ERR, and NULL.
Referenced by add_resource_instance(), send_full_notify(), and timer_send_notify().
| char* get_auth_string | ( | int | flag | ) |
Definition at line 928 of file rls/notify.c.
References ACTIVE_STATE, NULL, PENDING_STATE, and TERMINATED_STATE.
Referenced by add_resource_instance(), and timer_send_notify().
| int process_list_and_exec | ( | xmlNodePtr | list_node, | |
| list_func_t | function, | |||
| void * | param | |||
| ) |
Definition at line 858 of file rls/notify.c.
References LM_DBG, LM_ERR, NULL, process_list_and_exec(), and XMLNodeGetAttrContentByName.
Referenced by constr_rlmi_doc(), process_list_and_exec(), and resource_subscriptions().
| void rls_free_td | ( | dlg_t * | td | ) |
Definition at line 624 of file rls/notify.c.
References dlg::loc_uri, pkg_free, dlg::rem_uri, and _str::s.
Referenced by rls_send_notify().
| void rls_notify_callback | ( | struct cell * | t, | |
| int | type, | |||
| struct tmcb_params * | ps | |||
| ) |
Definition at line 794 of file rls/notify.c.
References subscription::callid, tmcb_params::code, core_hash(), DB_STR, db_func::delete, from_tag, subscription::from_tag, hash_size, LM_DBG, LM_ERR, db_val_t::nul, NULL, tmcb_params::param, pres_delete_shtable, rls_db, rls_dbf, rls_table, rlsubs_table, shm_free, str_callid_col, str_to_tag_col, db_val_t::str_val, subscription::to_tag, db_val_t::type, db_func::use_table, and db_val_t::val.
Referenced by rls_send_notify().
Definition at line 717 of file rls/notify.c.
References dlg_id::call_id, subscription::callid, subscription::contact, DLG_CONFIRMED, ERR_MEM, subscription::from_domain, subscription::from_tag, subscription::from_user, grep_sock_info(), dlg::id, dlg_seq::is_set, _str::len, LM_DBG, LM_ERR, dlg::loc_seq, dlg_id::loc_tag, dlg::loc_uri, subscription::local_cseq, NULL, parse_phostport(), parse_rr_body(), pkg_free, pkg_malloc, PKG_MEM_STR, port, subscription::record_route, dlg_id::rem_tag, dlg::rem_target, dlg::rem_uri, dlg::route_set, _str::s, dlg::send_sock, subscription::sockinfo_str, dlg::state, subscription::to_domain, subscription::to_tag, subscription::to_user, uandd_to_uri(), and dlg_seq::value.
Referenced by rls_send_notify().
Definition at line 540 of file rls/notify.c.
References CRLF, CRLF_LEN, ERR_MEM, subscription::event, subscription::expires, _str::len, len, LM_ERR, subscription::local_contact, MAX_FORWARD, pres_ev::name, NULL, pkg_free, pkg_malloc, PKG_MEM_STR, RLS_HDR_LEN, and _str::s.
Referenced by rls_send_notify().
Definition at line 631 of file rls/notify.c.
References dialog_id::callid, subscription::callid, ERR_MEM, dialog_id::from_tag, subscription::from_tag, _str::len, LM_DBG, LM_ERR, NULL, pkg_free, rls_free_td(), rls_notify_callback(), rls_notify_dlg(), rls_notify_extra_hdr(), _str::s, SHARE_MEM, shm_free, shm_malloc(), tm_binds::t_request_within, tmb, dialog_id::to_tag, and subscription::to_tag.
Referenced by agg_body_sendn_update(), and handle_expired_record().
| int send_full_notify | ( | subs_t * | subs, | |
| xmlNodePtr | rl_node, | |||
| int | version, | |||
| str * | rl_uri, | |||
| unsigned int | hash_code | |||
| ) |
Definition at line 70 of file rls/notify.c.
References agg_body_sendn_update(), auth_state_col, BOUNDARY_STRING_LEN, constr_multipart_body(), constr_rlmi_doc(), CONSTR_RLSUBS_DID(), content_type_col, DB_INT, DB_STR, db_func::free_result, generate_string(), db_val_t::int_val, LM_DBG, LM_ERR, db_res::n, NO_UPDATE_TYPE, db_val_t::nul, NULL, pkg_free, pres_state_col, db_func::query, reason_col, resource_uri_col, rlpres_table, rls_db, rls_dbf, _str::s, str_auth_state_col, str_content_type_col, str_presence_state_col, str_reason_col, str_resource_uri_col, str_rlsubs_did_col, str_updated_col, db_val_t::str_val, db_val_t::type, db_func::update, db_func::use_table, and db_val_t::val.
Referenced by rls_handle_subscribe().
| int auth_state_col = 0 |
Definition at line 58 of file rls/notify.c.
Referenced by add_resource_instance(), constr_multipart_body(), send_full_notify(), and timer_send_notify().
| int content_type_col |
Definition at line 57 of file rls/notify.c.
Referenced by constr_multipart_body(), send_full_notify(), and timer_send_notify().
| int pres_state_col = 0 |
Definition at line 57 of file rls/notify.c.
Referenced by constr_multipart_body(), send_full_notify(), and timer_send_notify().
| int reason_col = 0 |
Definition at line 58 of file rls/notify.c.
Referenced by add_resource_instance(), get_database_info(), get_subs_db(), restore_db_subs(), rls_restore_db_subs(), send_full_notify(), timer_send_notify(), update_db_subs(), and update_watchers_status().
| int resource_uri_col = 0 |
Definition at line 57 of file rls/notify.c.
Referenced by add_resource_instance(), constr_multipart_body(), send_full_notify(), and timer_send_notify().
1.5.6