#include <stdio.h>#include <stdlib.h>#include <string.h>#include "../../sr_module.h"#include "../../dprint.h"#include "../../ut.h"#include "../../error.h"#include "../../mem/mem.h"#include "uridb_mod.h"#include "checks.h"

Go to the source code of this file.
Defines | |
| #define | DOMAIN_COL "domain" |
| #define | DOMAIN_COL_LEN (sizeof(DOMAIN_COL) - 1) |
| #define | SUBSCRIBER_TABLE "subscriber" |
| #define | SUBSCRIBER_TABLE_LEN (sizeof(SUBSCRIBER_TABLE) - 1) |
| #define | SUBSCRIBER_TABLE_VERSION 6 |
| #define | URI_TABLE "uri" |
| #define | URI_TABLE_LEN (sizeof(URI_TABLE) - 1) |
| #define | URI_TABLE_VERSION 1 |
| #define | URI_USER_COL "uri_user" |
| #define | URI_USER_COL_LEN (sizeof(URI_USER_COL) - 1) |
| #define | USER_COL "username" |
| #define | USER_COL_LEN (sizeof(USER_COL) - 1) |
Functions | |
| static int | child_init (int rank) |
| static void | destroy (void) |
| static int | fixup_exist (void **param, int param_no) |
| static int | mod_init (void) |
Variables | |
| static cmd_export_t | cmds [] |
| str | db_table = {SUBSCRIBER_TABLE, SUBSCRIBER_TABLE_LEN} |
| static str | db_url = {DEFAULT_RODB_URL, DEFAULT_RODB_URL_LEN} |
| struct module_exports | exports |
| static param_export_t | params [] |
| str | uridb_domain_col = {DOMAIN_COL, DOMAIN_COL_LEN} |
| str | uridb_uriuser_col = {URI_USER_COL, URI_USER_COL_LEN} |
| str | uridb_user_col = {USER_COL, USER_COL_LEN} |
| int | use_domain = 0 |
| int | use_uri_table = 0 |
| #define DOMAIN_COL "domain" |
Definition at line 67 of file uridb_mod.c.
| #define DOMAIN_COL_LEN (sizeof(DOMAIN_COL) - 1) |
Definition at line 68 of file uridb_mod.c.
| #define SUBSCRIBER_TABLE "subscriber" |
Definition at line 73 of file uridb_mod.c.
| #define SUBSCRIBER_TABLE_LEN (sizeof(SUBSCRIBER_TABLE) - 1) |
Definition at line 74 of file uridb_mod.c.
| #define SUBSCRIBER_TABLE_VERSION 6 |
| #define URI_TABLE "uri" |
Definition at line 61 of file uridb_mod.c.
| #define URI_TABLE_LEN (sizeof(URI_TABLE) - 1) |
Definition at line 62 of file uridb_mod.c.
| #define URI_TABLE_VERSION 1 |
| #define URI_USER_COL "uri_user" |
Definition at line 70 of file uridb_mod.c.
| #define URI_USER_COL_LEN (sizeof(URI_USER_COL) - 1) |
Definition at line 71 of file uridb_mod.c.
| #define USER_COL "username" |
Definition at line 64 of file uridb_mod.c.
| #define USER_COL_LEN (sizeof(USER_COL) - 1) |
Definition at line 65 of file uridb_mod.c.
| static int child_init | ( | int | rank | ) | [static] |
Module initialization function callee in each child separately
Definition at line 142 of file uridb_mod.c.
References _str::len, and uridb_db_init().
| static void destroy | ( | void | ) | [static] |
| static int fixup_exist | ( | void ** | param, | |
| int | param_no | |||
| ) | [static] |
| static int mod_init | ( | void | ) | [static] |
Module initialization function that is called before the main process forks
Definition at line 154 of file uridb_mod.c.
References _str::len, LM_ERR, _str::s, SUBSCRIBER_TABLE_VERSION, URI_TABLE_VERSION, uridb_db_bind(), uridb_db_ver(), and use_uri_table.
cmd_export_t cmds[] [static] |
Definition at line 94 of file uridb_mod.c.
Name of URI table
Definition at line 81 of file uridb_mod.c.
Definition at line 80 of file uridb_mod.c.
| struct module_exports exports |
Definition at line 123 of file uridb_mod.c.
param_export_t params[] [static] |
Definition at line 108 of file uridb_mod.c.
| str uridb_domain_col = {DOMAIN_COL, DOMAIN_COL_LEN} |
Name of domain column in URI table
Definition at line 83 of file uridb_mod.c.
Referenced by check_username(), and does_uri_exist().
| str uridb_uriuser_col = {URI_USER_COL, URI_USER_COL_LEN} |
Name of uri_user column in URI table
Definition at line 84 of file uridb_mod.c.
Referenced by check_username(), and does_uri_exist().
| str uridb_user_col = {USER_COL, USER_COL_LEN} |
Name of username column in URI table
Definition at line 82 of file uridb_mod.c.
Referenced by check_username(), and does_uri_exist().
| int use_domain = 0 |
Use domain in is_user_in
Definition at line 87 of file uridb_mod.c.
| int use_uri_table = 0 |
Whether or not should be uri table used
Definition at line 86 of file uridb_mod.c.
Referenced by check_username(), does_uri_exist(), and mod_init().
1.5.6