212        ast_log(
LOG_WARNING, 
"Syntax: REALTIME(family,fieldmatch[,matchvalue[,delim1[,delim2]]]) - missing argument!\n");
 
  237        resultslen += strlen(
var->name) + strlen(
var->value);
 
  239    resultslen += n * (strlen(
args.delim1) + strlen(
args.delim2)) + 1;
 
  241    if (resultslen > 
len) {
 
  242        ast_log(
LOG_WARNING, 
"Failed to fetch. Realtime data is too large: need %zu, have %zu.\n", resultslen, 
len);
 
 
  275        ast_log(
LOG_WARNING, 
"Syntax: %s(family,fieldmatch,matchvalue,updatecol) - missing argument!\n", cmd);
 
  282        ast_log(
LOG_WARNING, 
"Syntax: %s(family,fieldmatch,matchvalue,updatecol) - missing argument!\n", cmd);
 
  293        ast_log(
LOG_WARNING, 
"Failed to update. Check the debug log for possible data repository related entries.\n");
 
 
  310    enum { rtfield, rthash } which;
 
  318    if (!strcmp(cmd, 
"REALTIME_FIELD")) {
 
  325        ast_log(
LOG_WARNING, 
"Syntax: %s(family,fieldmatch,matchvalue%s) - missing argument!\n", cmd, which == rtfield ? 
",fieldname" : 
"");
 
  331    if ((which == rtfield && 
args.argc != 4) || (which == rthash && 
args.argc != 3)) {
 
  332        ast_log(
LOG_WARNING, 
"Syntax: %s(family,fieldmatch,matchvalue%s) - missing argument!\n", cmd, which == rtfield ? 
",fieldname" : 
"");
 
  351        if (which == rtfield) {
 
  353            if (!strcasecmp(
var->name, 
args.fieldname)) {
 
  358        } 
else if (which == rthash) {
 
  359            ast_debug(1, 
"Setting hash key %s to value %s\n", 
var->name, 
var->value);
 
  367    if (which == rthash) {
 
 
  394        ast_log(
LOG_WARNING, 
"Syntax: REALTIME_STORE(family,field1,field2,...,field30) - missing argument!\n");
 
  406        a.f[0], v.v[0], 
a.f[1], v.v[1], 
a.f[2], v.v[2], 
a.f[3], v.v[3], 
a.f[4], v.v[4],
 
  407        a.f[5], v.v[5], 
a.f[6], v.v[6], 
a.f[7], v.v[7], 
a.f[8], v.v[8], 
a.f[9], v.v[9],
 
  408        a.f[10], v.v[10], 
a.f[11], v.v[11], 
a.f[12], v.v[12], 
a.f[13], v.v[13], 
a.f[14], v.v[14],
 
  409        a.f[15], v.v[15], 
a.f[16], v.v[16], 
a.f[17], v.v[17], 
a.f[18], v.v[18], 
a.f[19], v.v[19],
 
  410        a.f[20], v.v[20], 
a.f[21], v.v[21], 
a.f[22], v.v[22], 
a.f[23], v.v[23], 
a.f[24], v.v[24],
 
  411        a.f[25], v.v[25], 
a.f[26], v.v[26], 
a.f[27], v.v[27], 
a.f[28], v.v[28], 
a.f[29], v.v[29], 
SENTINEL 
  415        ast_log(
LOG_WARNING, 
"Failed to store. Check the debug log for possible data repository related entries.\n");
 
  417        snprintf(storeid, 
sizeof(storeid), 
"%d", res);
 
 
  442        ast_log(
LOG_WARNING, 
"Syntax: REALTIME_DESTROY(family,fieldmatch[,matchvalue[,delim1[,delim2]]]) - missing argument!\n");
 
  468            resultslen += strlen(
var->name) + strlen(
var->value);
 
  471        resultslen += n * (strlen(
args.delim1) + strlen(
args.delim2)) + 1;
 
  473        if (resultslen > 
len) {
 
  478            ast_log(
LOG_WARNING, 
"Failed to fetch/destroy. Realtime data is too large: need %zu, have %zu.\n", resultslen, 
len);
 
 
  519    .
name = 
"REALTIME_FIELD",
 
 
  525    .
name = 
"REALTIME_HASH",
 
 
  530    .
name = 
"REALTIME_STORE",
 
 
  535    .
name = 
"REALTIME_DESTROY",
 
 
struct sla_ringing_trunk * first
Asterisk main include file. File version handling, generic pbx functions.
#define ast_strdupa(s)
duplicate a string in memory from the stack
General Asterisk PBX channel definitions.
int ast_autoservice_stop(struct ast_channel *chan)
Stop servicing a channel for us...
int ast_autoservice_start(struct ast_channel *chan)
Automatically service a channel for us...
Generic File Format Support. Should be included by clients of the file handling routines....
static int function_realtime_writedestroy(struct ast_channel *chan, const char *cmd, char *data, const char *value)
Wrapper to execute REALTIME_DESTROY from a write operation. Allows execution even if live_dangerously...
static int function_realtime_write(struct ast_channel *chan, const char *cmd, char *data, const char *value)
static struct ast_custom_function realtime_store_function
static struct ast_custom_function realtime_destroy_function
static struct ast_custom_function realtimehash_function
static int realtimefield_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
static int function_realtime_readdestroy(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
static int function_realtime_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
static int load_module(void)
static struct ast_custom_function realtime_function
static int unload_module(void)
static int function_realtime_store(struct ast_channel *chan, const char *cmd, char *data, const char *value)
static struct ast_custom_function realtimefield_function
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
Application convenience functions, designed to give consistent look and feel to Asterisk apps.
#define AST_APP_ARG(name)
Define an application argument.
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
Configuration File Parser.
struct ast_variable * ast_load_realtime_all(const char *family,...) attribute_sentinel
int ast_destroy_realtime(const char *family, const char *keyfield, const char *lookup,...) attribute_sentinel
Destroy realtime configuration.
int ast_update_realtime(const char *family, const char *keyfield, const char *lookup,...) attribute_sentinel
Update realtime configuration.
int ast_store_realtime(const char *family,...) attribute_sentinel
Create realtime configuration.
void ast_variables_destroy(struct ast_variable *var)
Free variable list.
#define ast_debug(level,...)
Log a DEBUG message.
Asterisk locking-related definitions:
Asterisk module definitions.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
#define ASTERISK_GPL_KEY
The text the key() function should return.
Core PBX routines and definitions.
int pbx_builtin_setvar_helper(struct ast_channel *chan, const char *name, const char *value)
Add a variable to the channel variable stack, removing the most recently set value for the same name.
#define ast_custom_function_register_escalating(acf, escalation)
Register a custom function which requires escalated privileges.
#define ast_custom_function_register(acf)
Register a custom function.
int ast_custom_function_unregister(struct ast_custom_function *acf)
Unregister a custom function.
int ast_str_append(struct ast_str **buf, ssize_t max_len, const char *fmt,...)
Append to a thread local dynamic string.
char * ast_str_set_escapecommas(struct ast_str **buf, ssize_t maxlen, const char *src, size_t maxsrc)
Set a dynamic string to a non-NULL terminated substring, with escaping of commas.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
#define ast_str_alloca(init_len)
void ast_str_reset(struct ast_str *buf)
Reset the content of a dynamic string. Useful before a series of ast_str_append.
char *attribute_pure ast_str_buffer(const struct ast_str *buf)
Returns the string buffer within the ast_str buf.
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
struct ast_str * ast_str_thread_get(struct ast_threadstorage *ts, size_t init_len)
Retrieve a thread locally stored dynamic string.
Main Channel structure associated with a channel.
Data structure associated with a custom dialplan function.
Support for dynamic strings.
Structure for variables, used for configurations and for channel variables.
struct ast_variable * next
#define AST_THREADSTORAGE(name)
Define a thread storage variable.