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

Go to the source code of this file.
Defines | |
| #define | Stale_cseq_code 401 |
Functions | |
| subs_t * | constr_new_subs (struct sip_msg *msg, struct to_body *pto, pres_ev_t *event) |
| int | get_resource_list (str *pres_uri, char **list) |
| int | reply_200 (struct sip_msg *msg, str *contact, int expires) |
| int | reply_421 (struct sip_msg *msg) |
| int | reply_489 (struct sip_msg *msg) |
| int | resource_subscriptions (subs_t *subs, xmlNodePtr rl_node) |
| int | rls_handle_subscribe (struct sip_msg *msg, char *s1, char *s2) |
| int | send_resource_subs (char *uri, void *param) |
| int | update_rlsubs (subs_t *subs, unsigned int hash_code) |
Variables | |
| int | counter = 0 |
| static str | pu_400_rpl = str_init("Bad request") |
| static str | pu_421_rpl = str_init("Extension Required") |
| static str | pu_489_rpl = str_init("Bad Event") |
| static str | stale_cseq_rpl = str_init("Stale Cseq Value") |
| static str | su_200_rpl = str_init("OK") |
| #define Stale_cseq_code 401 |
| int get_resource_list | ( | str * | pres_uri, | |
| char ** | list | |||
| ) |
Definition at line 67 of file rls/subscribe.c.
References xcap_doc_sel::auid, DB_INT, DB_STR, xcap_get_req::doc_sel, xcap_doc_sel::doc_type, ERR_MEM, xcap_get_req::etag, xcap_doc_sel::filename, db_func::free_result, sip_uri::host, IF_NONE_MATCH, db_val_t::int_val, _str::len, LM_DBG, LM_ERR, xcap_get_req::match_type, db_res::n, db_val_t::nul, NULL, parse_uri(), pkg_malloc, PKG_MEM_STR, xcap_get_req::port, db_func::query, RESOURCE_LIST, rls_db, rls_dbf, rls_integrated_xcap_server, rls_xcap_table, ROW_VALUES, db_res::rows, _str::s, str_doc_col, str_doc_type_col, str_domain_col, str_etag_col, str_username_col, db_val_t::str_val, db_val_t::string_val, xcap_doc_sel::type, db_val_t::type, db_func::use_table, sip_uri::user, USERS_TYPE, db_val_t::val, xcap_GetNewDoc, xcap_port, xcap_root, xcap_get_req::xcap_root, and xcap_doc_sel::xid.
Referenced by rls_handle_subscribe().
Definition at line 234 of file rls/subscribe.c.
References add_lump_rpl(), CRLF, CRLF_LEN, _str::len, len, LM_ERR, LUMP_RPL_HDR, NULL, pkg_free, pkg_malloc, _str::s, sl_binds::send_reply, and slb.
Referenced by rls_handle_subscribe().
| int reply_421 | ( | struct sip_msg * | msg | ) |
Definition at line 204 of file rls/subscribe.c.
References add_lump_rpl(), _str::len, LM_ERR, LUMP_RPL_HDR, _str::s, sl_binds::send_reply, and slb.
Referenced by rls_handle_subscribe().
| int reply_489 | ( | struct sip_msg * | msg | ) |
Definition at line 288 of file rls/subscribe.c.
References add_lump_rpl(), CRLF, CRLF_LEN, _str::len, LM_ERR, LUMP_RPL_HDR, pkg_free, pres_get_ev_list, _str::s, sl_binds::send_reply, and slb.
Referenced by rls_handle_subscribe().
| int resource_subscriptions | ( | subs_t * | subs, | |
| xmlNodePtr | rl_node | |||
| ) |
Definition at line 742 of file rls/subscribe.c.
References buf, CONSTR_RLSUBS_DID(), subs_info::contact, to_body::error, subscription::event, subs_info::event, subscription::expires, subs_info::expires, subs_info::extra_headers, subscription::from_domain, subscription::from_user, get_event_flag(), subs_info::id, _str::len, LM_ERR, subscription::local_contact, pres_ev::name, NULL, pkg_free, process_list_and_exec(), RLS_SUBSCRIBE, _str::s, s, send_resource_subs(), subs_info::source_flag, uandd_to_uri(), to_body::uri, and subs_info::watcher_uri.
Referenced by rls_handle_subscribe().
| int rls_handle_subscribe | ( | struct sip_msg * | msg, | |
| char * | s1, | |||
| char * | s2 | |||
| ) |
Definition at line 330 of file rls/subscribe.c.
References param::body, hdr_field::body, subscription::callid, sip_msg::callid, cmp_hdrname_strzn(), subscription::contact, core_hash(), to_body::error, subscription::event, sip_msg::event, subscription::event_id, subscription::expires, sip_msg::from, get_resource_list(), hash_size, HDR_EOH_F, sip_msg::headers, sip_uri::host, _str::len, len, LM_DBG, LM_ERR, subscription::local_cseq, lock, hdr_field::name, param::name, hdr_field::next, param::next, NULL, event::params, parse_event(), parse_from_header(), parse_headers(), parse_to(), hdr_field::parsed, sip_msg::parsed_uri, pkg_free, pres_extract_sdialog_info, pres_insert_shtable, pres_search_event, pres_search_shtable, subscription::pres_uri, subscription::record_route, reply_200(), reply_421(), reply_489(), resource_subscriptions(), rls_events, rls_max_expires, rls_table, _str::s, send_full_notify(), sl_binds::send_reply, server_address, hdr_field::sibling, slb, to_body::tag_value, sip_msg::to, TO, to_presence_code, subscription::to_tag, uandd_to_uri(), update_rlsubs(), to_body::uri, sip_uri::user, subscription::version, and XMLDocGetNodeByName.
| int send_resource_subs | ( | char * | uri, | |
| void * | param | |||
| ) |
Definition at line 730 of file rls/subscribe.c.
References _str::len, pua_send_subscribe, and _str::s.
Referenced by resource_subscriptions().
| int update_rlsubs | ( | subs_t * | subs, | |
| unsigned int | hash_code | |||
| ) |
Definition at line 653 of file rls/subscribe.c.
References subscription::callid, subscription::db_flag, subs_entry::entries, ERR_MEM, to_body::error, subscription::expires, subscription::from_tag, _str::len, LM_DBG, LM_ERR, subscription::local_cseq, lock, subscription::next, NO_UPDATEDB_FLAG, NULL, pkg_malloc, PKG_MEM_STR, pres_search_shtable, subscription::pres_uri, subscription::remote_cseq, rls_table, _str::s, s, shm_free, Stale_cseq_code, subscription::to_tag, UPDATEDB_FLAG, and subscription::version.
Referenced by rls_handle_subscribe().
| int counter = 0 |
Definition at line 51 of file rls/subscribe.c.
str pu_400_rpl = str_init("Bad request") [static] |
Definition at line 55 of file rls/subscribe.c.
str pu_421_rpl = str_init("Extension Required") [static] |
Definition at line 54 of file rls/subscribe.c.
str pu_489_rpl = str_init("Bad Event") [static] |
Definition at line 57 of file rls/subscribe.c.
str stale_cseq_rpl = str_init("Stale Cseq Value") [static] |
Definition at line 56 of file rls/subscribe.c.
str su_200_rpl = str_init("OK") [static] |
Definition at line 53 of file rls/subscribe.c.
1.5.6