The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Implements sql_state matching and categorisation. More...
#include "rlm_sql.h"
Go to the source code of this file.
Functions | |
int | sql_state_entries_from_cs (fr_trie_t *states, CONF_SECTION *cs) |
Insert the contents of a CONF_SECTION into the state trie. More... | |
int | sql_state_entries_from_table (fr_trie_t *states, sql_state_entry_t const table[]) |
Insert the contents of a state table into the state trie. More... | |
sql_state_entry_t const * | sql_state_entry_find (fr_trie_t const *states, char const *sql_state) |
Lookup an SQL state based on an error code returned from the SQL server or client library. More... | |
fr_trie_t * | sql_state_trie_alloc (TALLOC_CTX *ctx) |
Allocate a sql_state trie, and insert the initial set of entries. More... | |
Variables | |
static sql_state_entry_t | sql_2011_classes [] |
These are standard, universal, error classes which all SQL servers should produce. More... | |
Implements sql_state matching and categorisation.
Definition in file sql_state.c.
int sql_state_entries_from_cs | ( | fr_trie_t * | states, |
CONF_SECTION * | cs | ||
) |
Insert the contents of a CONF_SECTION into the state trie.
The attribute side of the CONF_PAIR specifies the sqlclass and the value specifies the error code.
[in] | states | Trie of states. |
[in] | cs | Containing overrides to define new sql state entries or change existing ones. |
Definition at line 153 of file sql_state.c.
int sql_state_entries_from_table | ( | fr_trie_t * | states, |
sql_state_entry_t const | table[] | ||
) |
Insert the contents of a state table into the state trie.
[in] | states | Trie of states. |
[in] | table | to insert. |
Definition at line 124 of file sql_state.c.
sql_state_entry_t const* sql_state_entry_find | ( | fr_trie_t const * | states, |
char const * | sql_state | ||
) |
Lookup an SQL state based on an error code returned from the SQL server or client library.
[in] | states | Trie of states. |
[in] | sql_state | to lookup. |
Definition at line 203 of file sql_state.c.
fr_trie_t* sql_state_trie_alloc | ( | TALLOC_CTX * | ctx | ) |
Allocate a sql_state trie, and insert the initial set of entries.
[in] | ctx | to allocate states in. |
Definition at line 102 of file sql_state.c.
|
static |
These are standard, universal, error classes which all SQL servers should produce.
Definition at line 35 of file sql_state.c.