USRLOC - Usrloc contact handling functions
#include "ucontact.h"#include <string.h>#include "../../mem/shm_mem.h"#include "../../ut.h"#include "../../ip_addr.h"#include "../../socket_info.h"#include "../../dprint.h"#include "../../lib/srdb1/db.h"#include "ul_mod.h"#include "ul_callback.h"#include "usrloc.h"#include "urecord.h"
Go to the source code of this file.
Definition in file modules_k/usrloc/ucontact.c.
| int db_delete_ucontact | ( | ucontact_t * | _c | ) |
| _c | deleted contact |
Definition at line 740 of file modules_k/usrloc/ucontact.c.
References ucontact::aor, ucontact::c, ucontact::callid, callid_col, contact_col, ucontact::domain, domain_col, FL_MEM, ucontact::flags, _str::len, db_val_t::nul, _str::s, db_val_t::str_val, db_val_t::type, use_domain, user_col, and db_val_t::val.
| int db_insert_ucontact | ( | ucontact_t * | _c | ) |
| _c | inserted contact |
Definition at line 404 of file modules_k/usrloc/ucontact.c.
References ucontact::aor, db_val_t::bitmap_val, ucontact::c, ucontact::callid, callid_col, ucontact::cflags, contact_col, ucontact::cseq, cseq_col, ucontact::domain, domain_col, db_val_t::double_val, ucontact::expires, expires_col, FL_MEM, ucontact::flags, flags_col, ucontact::instance, instance_col, db_val_t::int_val, last_mod_col, ucontact::last_modified, _str::len, ucontact::methods, methods_col, db_val_t::nul, ucontact::path, path_col, ucontact::q, q_col, ucontact::received, received_col, ucontact::reg_id, reg_id_col, register_udomain(), ucontact::ruid, ruid_col, _str::s, ucontact::sock, sock_col, db_val_t::str_val, db_val_t::time_val, db_val_t::type, use_domain, ucontact::user_agent, user_agent_col, user_col, and db_val_t::val.

| int db_update_ucontact | ( | ucontact_t * | _c | ) |
| _c | updated contact |
Definition at line 574 of file modules_k/usrloc/ucontact.c.
References ucontact::aor, db_val_t::bitmap_val, ucontact::c, ucontact::callid, callid_col, ucontact::cflags, contact_col, ucontact::cseq, cseq_col, ucontact::domain, domain_col, db_val_t::double_val, ucontact::expires, expires_col, FL_MEM, ucontact::flags, flags_col, ucontact::instance, instance_col, db_val_t::int_val, last_mod_col, ucontact::last_modified, _str::len, ucontact::methods, methods_col, db_val_t::nul, ucontact::path, path_col, ucontact::q, q_col, ucontact::received, received_col, ucontact::reg_id, reg_id_col, register_udomain(), ucontact::ruid, ruid_col, _str::s, ucontact::sock, sock_col, db_val_t::str_val, db_val_t::time_val, db_val_t::type, use_domain, ucontact::user_agent, user_agent_col, user_col, and db_val_t::val.

| void free_ucontact | ( | ucontact_t * | _c | ) |
| _c | freed contact |
Definition at line 120 of file modules_k/usrloc/ucontact.c.
References ucontact::c, ucontact::callid, ucontact::instance, ucontact::path, ucontact::received, ucontact::ruid, _str::s, and ucontact::user_agent.
| int mem_update_ucontact | ( | ucontact_t * | _c, | |
| ucontact_info_t * | _ci | |||
| ) |
| _c | contact | |
| _ci | contact informations |
Definition at line 200 of file modules_k/usrloc/ucontact.c.
References ucontact_info::cflags, ucontact::cflags, ucontact_info::cseq, ucontact::cseq, ucontact_info::expires, ucontact::expires, ucontact_info::flags, ucontact::flags, ucontact_info::last_modified, ucontact::last_modified, _str::len, ucontact_info::methods, ucontact::methods, ucontact::path, ucontact_info::path, ucontact_info::q, ucontact::q, ucontact::received, ucontact_info::received, _str::s, ucontact_info::sock, ucontact::sock, ucontact_info::user_agent, and ucontact::user_agent.
| ucontact_t* new_ucontact | ( | str * | _dom, | |
| str * | _aor, | |||
| str * | _contact, | |||
| ucontact_info_t * | _ci | |||
| ) |
| _dom | domain | |
| _aor | address of record | |
| _contact | contact string | |
| _ci | contact informations |
Definition at line 59 of file modules_k/usrloc/ucontact.c.
References ucontact::aor, ucontact::c, ucontact_info::callid, ucontact::callid, ucontact_info::cflags, ucontact::cflags, ucontact_info::cseq, ucontact::cseq, ucontact::domain, ucontact_info::expires, ucontact::expires, ucontact_info::flags, ucontact::flags, ucontact::instance, ucontact_info::instance, ucontact_info::last_modified, ucontact::last_modified, _str::len, ucontact_info::methods, ucontact::methods, ucontact::path, ucontact_info::path, ucontact_info::q, ucontact::q, ucontact::received, ucontact_info::received, ucontact_info::reg_id, ucontact::reg_id, ucontact::ruid, ucontact_info::ruid, _str::s, ucontact_info::sock, ucontact::sock, ucontact::state, ucontact_info::user_agent, and ucontact::user_agent.
| void print_ucontact | ( | FILE * | _f, | |
| ucontact_t * | _c | |||
| ) |
| _f | output file | |
| _c | printed contact |
Definition at line 139 of file modules_k/usrloc/ucontact.c.
References ucontact::aor, ucontact::c, ucontact::callid, CS_DIRTY, CS_NEW, CS_SYNC, ucontact::cseq, ucontact::domain, ucontact::expires, ucontact::flags, ucontact::instance, _str::len, ucontact::methods, ucontact::next, ucontact::path, ucontact::prev, ucontact::q, ucontact::received, ucontact::reg_id, ucontact::ruid, _str::s, ucontact::sock, ucontact::state, UL_EXPIRED_TIME, and ucontact::user_agent.
| int st_delete_ucontact | ( | ucontact_t * | _c | ) |
| _c | updated contact |
Definition at line 297 of file modules_k/usrloc/ucontact.c.
References CS_DIRTY, CS_NEW, CS_SYNC, db_mode, ucontact::expires, ucontact::state, and WRITE_BACK.
| int st_expired_ucontact | ( | ucontact_t * | _c | ) |
| _c | expired contact |
Definition at line 338 of file modules_k/usrloc/ucontact.c.
References CS_DIRTY, CS_NEW, CS_SYNC, and ucontact::state.
| int st_flush_ucontact | ( | ucontact_t * | _c | ) |
| _c | flushed contact |
Definition at line 367 of file modules_k/usrloc/ucontact.c.
References CS_DIRTY, CS_NEW, CS_SYNC, and ucontact::state.
| void st_update_ucontact | ( | ucontact_t * | _c | ) |
| _c | updated contact |
Definition at line 261 of file modules_k/usrloc/ucontact.c.
References CS_DIRTY, CS_NEW, CS_SYNC, db_mode, ucontact::state, WRITE_BACK, and WRITE_THROUGH.
| static void unlink_contact | ( | struct urecord * | _r, | |
| ucontact_t * | _c | |||
| ) | [inline, static] |
| _r | record the contact belongs | |
| _c | removed contact |
Definition at line 800 of file modules_k/usrloc/ucontact.c.
References urecord::contacts, ucontact::next, and ucontact::prev.
Referenced by update_contact_pos().

| static void update_contact_pos | ( | struct urecord * | _r, | |
| ucontact_t * | _c | |||
| ) | [inline, static] |
| _r | record that holds the sorted contacts | |
| _c | new contact |
Definition at line 821 of file modules_k/usrloc/ucontact.c.
References urecord::contacts, desc_time_order, ucontact::next, ucontact::prev, ucontact::q, and unlink_contact().
Referenced by update_ucontact().


| int update_ucontact | ( | struct urecord * | _r, | |
| ucontact_t * | _c, | |||
| ucontact_info_t * | _ci | |||
| ) |
| _r | record the contact belongs to | |
| _c | updated contact | |
| _ci | new contact informations |
Definition at line 872 of file modules_k/usrloc/ucontact.c.
References db_insert_ucontact(), db_mode, DB_ONLY, db_update_ucontact(), mem_update_ucontact(), run_ul_callbacks(), st_update_ucontact(), ucontact::state, update_contact_pos(), and WRITE_THROUGH.

1.7.1