Functions

group.c File Reference

Group membership module

More...

#include <string.h>
#include "../../dprint.h"
#include "../../lib/srdb1/db.h"
#include "../../ut.h"
#include "../../parser/digest/digest.h"
#include "../../parser/hf.h"
#include "../../parser/parse_from.h"
#include "../../parser/parse_uri.h"
#include "group.h"
#include "group_mod.h"
Include dependency graph for group.c:

Go to the source code of this file.

Functions


Detailed Description

Definition in file group.c.


Function Documentation

int get_username_domain ( struct sip_msg msg,
group_check_p  gcp,
str username,
str domain 
)

Set the username and domain depending on the value of the SIP message and the group check structure.

Parameters:
msg SIP message
gcp group check structure
username stored username
domain stored domain
Returns:
0 on success, -1 on failure

Definition at line 59 of file group.c.

References sip_uri::host, hdr_field::parsed, sip_msg::parsed_uri, and sip_uri::user.

Referenced by get_user_group(), and is_user_in().

Here is the caller graph for this function:

int group_db_bind ( const str db_url  ) 
Parameters:
db_url database URL
Returns:
0 on success, -1 on failure

Definition at line 224 of file group.c.

References db_bind_mod(), DB_CAP_QUERY, and DB_CAPABILITY.

Referenced by mod_init().

Here is the call graph for this function:

Here is the caller graph for this function:

int group_db_init ( const str db_url  ) 
Parameters:
db_url database URL
Returns:
0 on success, -1 on failure

Definition at line 202 of file group.c.

Referenced by child_init(), and mod_init().

Here is the caller graph for this function:

int is_user_in ( struct sip_msg _msg,
char *  _hf,
char *  _grp 
)
Parameters:
_msg SIP message
_hf Header field
_grp checked table
Returns:
1 on success, negative on failure

Definition at line 144 of file group.c.

References domain_column, get_username_domain(), group_column, RES_ROW_N, table, use_domain, user_column, VAL_NULL, VAL_STR, and VAL_TYPE.

Here is the call graph for this function: