Functions

modules_k/p_usrloc/ucontact.c File Reference

USRLOC - Usrloc contact handling functions

More...

#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 "p_usrloc_mod.h"
#include "../usrloc/ul_callback.h"
#include "urecord.h"
#include "ul_db_layer.h"
#include "dlist.h"
Include dependency graph for modules_k/p_usrloc/ucontact.c:

Go to the source code of this file.

Functions


Detailed Description

Definition in file modules_k/p_usrloc/ucontact.c.


Function Documentation

int db_delete_ucontact ( ucontact_t _c  ) 
Parameters:
_c deleted contact
Returns:
0 on success, -1 on failure

Definition at line 680 of file modules_k/p_usrloc/ucontact.c.

Referenced by delete_ucontact(), wb_timer(), and wt_timer().

Here is the caller graph for this function:

int db_insert_ucontact ( ucontact_t _c  ) 
Parameters:
_c inserted contact
Returns:
0 on success, -1 on failure

Definition at line 388 of file modules_k/p_usrloc/ucontact.c.

Referenced by insert_ucontact(), update_ucontact(), and wb_timer().

Here is the caller graph for this function:

int db_update_ucontact ( ucontact_t _c  ) 
Parameters:
_c updated contact
Returns:
0 on success, -1 on failure

Definition at line 546 of file modules_k/p_usrloc/ucontact.c.

Referenced by update_ucontact(), and wb_timer().

Here is the caller graph for this function:

void free_ucontact ( ucontact_t _c  ) 
Parameters:
_c freed contact

Definition at line 111 of file modules_k/p_usrloc/ucontact.c.

Referenced by free_urecord(), mem_delete_ucontact(), and preload_udomain().

Here is the caller graph for this function:

int mem_update_ucontact ( ucontact_t _c,
ucontact_info_t _ci 
)
Parameters:
_c contact
_ci contact informations
Returns:
0 on success, -1 on failure

Definition at line 184 of file modules_k/p_usrloc/ucontact.c.

Referenced by update_ucontact().

Here is the caller graph for this function:

ucontact_t* new_ucontact ( str _dom,
str _aor,
str _contact,
ucontact_info_t _ci 
)
Parameters:
_dom domain
_aor address of record
_contact contact string
_ci contact informations
Returns:
new created contact on success, 0 on failure

Definition at line 59 of file modules_k/p_usrloc/ucontact.c.

Referenced by mem_insert_ucontact().

Here is the caller graph for this function:

void print_ucontact ( FILE *  _f,
ucontact_t _c 
)
Parameters:
_f output file
_c printed contact

Definition at line 128 of file modules_k/p_usrloc/ucontact.c.

Referenced by print_urecord().

Here is the caller graph for this function:

int st_delete_ucontact ( ucontact_t _c  ) 
Parameters:
_c updated contact
Returns:
1 if the contact should be deleted from memory immediately, 0 otherwise

Definition at line 281 of file modules_k/p_usrloc/ucontact.c.

Referenced by delete_ucontact().

Here is the caller graph for this function:

int st_expired_ucontact ( ucontact_t _c  ) 
Parameters:
_c expired contact
Returns:
1 if the contact should be removed from the database and 0 otherwise

Definition at line 322 of file modules_k/p_usrloc/ucontact.c.

Referenced by wb_timer().

Here is the caller graph for this function:

int st_flush_ucontact ( ucontact_t _c  ) 
Parameters:
_c flushed contact
Returns:
1 if the contact should be inserted, 2 if update and 0 otherwise

Definition at line 351 of file modules_k/p_usrloc/ucontact.c.

Referenced by wb_timer().

Here is the caller graph for this function:

void st_update_ucontact ( ucontact_t _c  ) 
Parameters:
_c updated contact

Definition at line 245 of file modules_k/p_usrloc/ucontact.c.

Referenced by update_ucontact().

Here is the caller graph for this function:

static void unlink_contact ( struct urecord _r,
ucontact_t _c 
) [inline, static]
Parameters:
_r record the contact belongs
_c removed contact

Definition at line 739 of file modules_k/p_usrloc/ucontact.c.

References urecord::contacts, ucontact::next, and ucontact::prev.

Referenced by update_contact_pos().

Here is the caller graph for this function:

static void update_contact_pos ( struct urecord _r,
ucontact_t _c 
) [inline, static]
Parameters:
_r record that holds the sorted contacts
_c new contact

Definition at line 760 of file modules_k/p_usrloc/ucontact.c.

References urecord::contacts, desc_time_order, ucontact::next, ucontact::prev, ucontact::q, and unlink_contact().

Referenced by update_ucontact().

Here is the call graph for this function:

Here is the caller graph for this function:

int update_ucontact ( struct urecord _r,
ucontact_t _c,
ucontact_info_t _ci 
)
Parameters:
_r record the contact belongs to
_c updated contact
_ci new contact informations
Returns:
0 on success, -1 on failure

Definition at line 811 of file modules_k/p_usrloc/ucontact.c.

Referenced by mi_usrloc_add().

Here is the caller graph for this function: