97 const struct group *g = obj;
103 struct group *g1 = obj1, *g2 = name2;
133 int trunc_warning = 0;
149 if (len - bufused > tmp + 2) {
151 buf[bufused++] =
'&';
154 }
else if (trunc_warning++ == 0) {
173 int len = 500, res = 0;
204 struct group *grhead;
206 int j, needrefresh = 1;
219 if (!(grhead =
ao2_find(group_container,
args.group, 0))) {
249 if (strcasecmp(
args.op,
"add") == 0) {
250 for (j = 0; j < inter.argc; j++) {
264 }
else if (strncasecmp(
args.op,
"del", 3) == 0) {
265 for (j = 0; j < inter.argc; j++) {
305 if (group_container) {
308 for (tmp = dbtree;
tmp; tmp = tmp->
next) {
310 if ((ptr = strrchr(groupname,
'/'))) {
Main Channel structure associated with a channel.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
static struct ast_custom_function dialgroup_function
Asterisk main include file. File version handling, generic pbx functions.
#define ast_realloc(p, len)
A wrapper for realloc()
static int unload_module(void)
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
void ast_db_freetree(struct ast_db_entry *entry)
Free structure created by ast_db_gettree()
void ao2_iterator_destroy(struct ao2_iterator *iter)
Destroy a container iterator.
int ast_custom_function_unregister(struct ast_custom_function *acf)
Unregister a custom function.
#define ast_strlen_zero(foo)
static struct ao2_container * group_container
struct ast_db_entry * next
static int group_hash_fn(const void *obj, const int flags)
General Asterisk PBX channel definitions.
Data structure associated with a custom dialplan function.
char name[AST_CHANNEL_NAME]
#define AST_MAX_EXTENSION
#define ao2_ref(o, delta)
#define ast_strdupa(s)
duplicate a string in memory from the stack
static int dialgroup_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
Core PBX routines and definitions.
#define ao2_container_alloc_hash(ao2_options, container_options, n_buckets, hash_fn, sort_fn, cmp_fn)
#define ao2_unlink(container, obj)
struct ast_db_entry * ast_db_gettree(const char *family, const char *keytree)
Get a list of values within the astdb tree.
static int load_module(void)
#define AST_NONSTANDARD_APP_ARGS(args, parse, sep)
Performs the 'nonstandard' argument separation process for an application.
char name[AST_MAX_EXTENSION]
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
#define ao2_iterator_next(iter)
#define ao2_alloc(data_size, destructor_fn)
static int entry_hash_fn(const void *obj, const int flags)
Module has failed to load, may be in an inconsistent state.
#define ao2_find(container, arg, flags)
static int entry_cmp_fn(void *obj1, void *name2, int flags)
static int dialgroup_refreshdb(struct ast_channel *chan, const char *cdialgroup)
static int group_cmp_fn(void *obj1, void *name2, int flags)
When we need to walk through a container, we use an ao2_iterator to keep track of the current positio...
int ast_db_del(const char *family, const char *key)
Delete entry in astdb.
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
static void group_destroy(void *vgroup)
int ast_db_put(const char *family, const char *key, const char *value)
Store value addressed by family/key.
static int dialgroup_write(struct ast_channel *chan, const char *cmd, char *data, const char *cvalue)
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
Persistant data storage (akin to *doze registry)
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
struct ao2_container * entries
struct ao2_iterator ao2_iterator_init(struct ao2_container *c, int flags) attribute_warn_unused_result
Create an iterator for a container.
#define ast_custom_function_register(acf)
Register a custom function.
#define AST_APP_ARG(name)
Define an application argument.
static force_inline int attribute_pure ast_str_hash(const char *str)
Compute a hash value on a string.
#define ao2_link(container, obj)