presence/hash.c File Reference

Kamailio presence module. More...

#include <stdio.h>
#include <stdlib.h>
#include "../../mem/shm_mem.h"
#include "../../dprint.h"
#include "../../str.h"
#include "../pua/hash.h"
#include "presence.h"
#include "hash.h"
#include "notify.h"

Include dependency graph for presence/hash.c:

Go to the source code of this file.

Functions

int delete_phtable (str *pres_uri, int event)
int delete_shtable (shtable_t htable, unsigned int hash_code, str to_tag)
void destroy_phtable (void)
void destroy_shtable (shtable_t htable, int hash_size)
void free_subs_list (subs_t *s_array, int mem_type, int ic)
int insert_phtable (str *pres_uri, int event, char *sphere)
int insert_shtable (shtable_t htable, unsigned int hash_code, subs_t *subs)
subs_tmem_copy_subs (subs_t *s, int mem_type)
subs_tmem_copy_subs_noc (subs_t *s)
phtable_tnew_phtable (void)
shtable_t new_shtable (int hash_size)
pres_entry_tsearch_phtable (str *pres_uri, int event, unsigned int hash_code)
subs_tsearch_shtable (shtable_t htable, str callid, str to_tag, str from_tag, unsigned int hash_code)
int update_phtable (presentity_t *presentity, str pres_uri, str body)
int update_shtable (shtable_t htable, unsigned int hash_code, subs_t *subs, int type)


Detailed Description

Kamailio presence module.

Definition in file presence/hash.c.


Function Documentation

int delete_phtable ( str pres_uri,
int  event 
)

int delete_shtable ( shtable_t  htable,
unsigned int  hash_code,
str  to_tag 
)

void destroy_phtable ( void   ) 

Definition at line 436 of file presence/hash.c.

References lock, pres_entry::next, NULL, phtable_size, shm_free, and pres_entry::sphere.

void destroy_shtable ( shtable_t  htable,
int  hash_size 
)

Definition at line 89 of file presence/hash.c.

References free_subs_list(), lock, NULL, shm_free, and SHM_MEM_TYPE.

Referenced by bind_presence().

void free_subs_list ( subs_t s_array,
int  mem_type,
int  ic 
)

int insert_phtable ( str pres_uri,
int  event,
char *  sphere 
)

int insert_shtable ( shtable_t  htable,
unsigned int  hash_code,
subs_t subs 
)

subs_t* mem_copy_subs ( subs_t s,
int  mem_type 
) [read]

subs_t* mem_copy_subs_noc ( subs_t s  ) 

phtable_t* new_phtable ( void   ) 

shtable_t new_shtable ( int  hash_size  ) 

Definition at line 44 of file presence/hash.c.

References subs_entry::entries, ERR_MEM, LM_ERR, lock, subscription::next, NULL, SHARE_MEM, shm_free, and shm_malloc().

Referenced by bind_presence(), and mod_init().

pres_entry_t* search_phtable ( str pres_uri,
int  event,
unsigned int  hash_code 
)

subs_t* search_shtable ( shtable_t  htable,
str  callid,
str  to_tag,
str  from_tag,
unsigned int  hash_code 
) [read]

int update_phtable ( presentity_t presentity,
str  pres_uri,
str  body 
)

int update_shtable ( shtable_t  htable,
unsigned int  hash_code,
subs_t subs,
int  type 
)


Generated on Thu May 24 02:00:38 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6