213 sprintf(prefix,
"%s-",
args.chan);
228 ast_log(
LOG_ERROR,
"Unable to allocate new datastore. Shared variable not set.\n");
236 if (!(varshead =
ast_calloc(1,
sizeof(*varshead)))) {
237 ast_log(
LOG_ERROR,
"Unable to allocate variable structure. Shared variable not set.\n");
249 varshead = varstore->
data;
266 "Variable: SHARED(%s)\r\n"
#define ast_channel_lock(chan)
Main Channel structure associated with a channel.
const ast_string_field uniqueid
#define ast_alloca(size)
call __builtin_alloca to ensure we get gcc builtin semantics
#define ast_channel_unref(c)
Decrease channel reference count.
struct ast_var_t * ast_var_assign(const char *name, const char *value)
const char * ast_var_name(const struct ast_var_t *var)
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
Structure for a data store object.
struct ast_datastore * ast_channel_datastore_find(struct ast_channel *chan, const struct ast_datastore_info *info, const char *uid)
Find a datastore on a channel.
static struct ast_datastore_info shared_variable_info
#define EVENT_FLAG_DIALPLAN
#define AST_LIST_TRAVERSE_SAFE_END
Closes a safe loop traversal block.
void ast_var_delete(struct ast_var_t *var)
int ast_datastore_free(struct ast_datastore *datastore)
Free a data store object.
struct ast_channel * ast_channel_get_by_name_prefix(const char *name, size_t name_len)
Find a channel by a name prefix.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
#define AST_LIST_REMOVE_CURRENT(field)
Removes the current entry from a list during a traversal.
const ast_string_field name
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
struct ast_datastore * ast_datastore_alloc(const struct ast_datastore_info *info, const char *uid)
#define AST_LIST_INSERT_HEAD(head, elm, field)
Inserts a list entry at the head of a list.
#define ast_channel_unlock(chan)
#define S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one...
#define AST_APP_ARG(name)
Define an application argument.
#define AST_LIST_TRAVERSE_SAFE_BEGIN(head, var, field)
Loops safely over (traverses) the entries in a list.
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
#define manager_event(category, event, contents,...)
External routines may send asterisk manager events this way.
struct ast_channel * ast_channel_get_by_name(const char *name)
Find a channel by name.
int ast_channel_datastore_add(struct ast_channel *chan, struct ast_datastore *datastore)
Add a datastore to a channel.
static char prefix[MAX_PREFIX]