98 const struct group *g = obj;
104 struct group *g1 = obj1, *g2 = name2;
134 int trunc_warning = 0;
150 if (
len - bufused >
tmp + 2) {
152 buf[bufused++] =
'&';
155 }
else if (trunc_warning++ == 0) {
174 int len = 500, res = 0;
205 struct group *grhead;
207 int j, needrefresh = 1;
250 if (strcasecmp(
args.op,
"add") == 0) {
251 for (j = 0; j < inter.argc; j++) {
265 }
else if (strncasecmp(
args.op,
"del", 3) == 0) {
266 for (j = 0; j < inter.argc; j++) {
311 if ((ptr = strrchr(groupname,
'/'))) {
Persistent data storage (akin to *doze registry)
int ast_db_put(const char *family, const char *key, const char *value)
Store value addressed by family/key.
int ast_db_del(const char *family, const char *key)
Delete entry in astdb.
struct ast_db_entry * ast_db_gettree(const char *family, const char *keytree)
Get a list of values within the astdb tree.
void ast_db_freetree(struct ast_db_entry *entry)
Free structure created by ast_db_gettree()
Asterisk main include file. File version handling, generic pbx functions.
#define ast_realloc(p, len)
A wrapper for realloc()
#define ast_strdupa(s)
duplicate a string in memory from the stack
#define ao2_iterator_next(iter)
#define ao2_link(container, obj)
Add an object to a container.
@ AO2_ALLOC_OPT_LOCK_MUTEX
#define ao2_unlink(container, obj)
Remove an object from a container.
#define ao2_find(container, arg, flags)
struct ao2_iterator ao2_iterator_init(struct ao2_container *c, int flags) attribute_warn_unused_result
Create an iterator for a container.
#define ao2_ref(o, delta)
Reference/unreference an object and return the old refcount.
void ao2_iterator_destroy(struct ao2_iterator *iter)
Destroy a container iterator.
#define ao2_alloc(data_size, destructor_fn)
#define ao2_container_alloc_hash(ao2_options, container_options, n_buckets, hash_fn, sort_fn, cmp_fn)
Allocate and initialize a hash container with the desired number of buckets.
General Asterisk PBX channel definitions.
#define AST_MAX_EXTENSION
static int entry_cmp_fn(void *obj1, void *name2, int flags)
static int dialgroup_refreshdb(struct ast_channel *chan, const char *cdialgroup)
static int entry_hash_fn(const void *obj, const int flags)
static int dialgroup_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
static void group_destroy(void *vgroup)
static struct ao2_container * group_container
static int dialgroup_write(struct ast_channel *chan, const char *cmd, char *data, const char *cvalue)
static struct ast_custom_function dialgroup_function
static int group_cmp_fn(void *obj1, void *name2, int flags)
static int group_hash_fn(const void *obj, const int flags)
static int load_module(void)
static int unload_module(void)
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.
#define AST_NONSTANDARD_APP_ARGS(args, parse, sep)
Performs the 'nonstandard' argument separation process for an application.
Asterisk module definitions.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
#define ASTERISK_GPL_KEY
The text the key() function should return.
@ AST_MODULE_LOAD_DECLINE
Module has failed to load, may be in an inconsistent state.
Core PBX routines and definitions.
#define ast_custom_function_register(acf)
Register a custom function.
int ast_custom_function_unregister(struct ast_custom_function *acf)
Unregister a custom function.
static force_inline int attribute_pure ast_str_hash(const char *str)
Compute a hash value on a string.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
When we need to walk through a container, we use an ao2_iterator to keep track of the current positio...
Main Channel structure associated with a channel.
Data structure associated with a custom dialplan function.
char name[AST_CHANNEL_NAME]
struct ao2_container * entries
char name[AST_MAX_EXTENSION]