99 const struct group *g = obj;
105 struct group *g1 = obj1, *g2 = name2;
135 int trunc_warning = 0;
149 int tmp = strlen(entry->
name);
151 if (len - bufused > tmp + 2) {
153 buf[bufused++] =
'&';
156 }
else if (trunc_warning++ == 0) {
175 int len = 500, res = 0;
206 struct group *grhead;
208 int j, needrefresh = 1;
221 if (!(grhead =
ao2_find(group_container,
args.group, 0))) {
248 if (strcasecmp(
args.op,
"add") == 0) {
249 for (j = 0; j < inter.argc; j++) {
255 if ((entry =
ao2_alloc(
sizeof(*entry), NULL))) {
263 }
else if (strncasecmp(
args.op,
"del", 3) == 0) {
264 for (j = 0; j < inter.argc; j++) {
305 for (tmp = dbtree; tmp; tmp = tmp->
next) {
307 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 ao2_link(arg1, arg2)
static int unload_module(void)
#define ao2_iterator_next(arg1)
void ast_db_freetree(struct ast_db_entry *entry)
Free structure created by ast_db_gettree()
#define AST_DECLARE_APP_ARGS(name, arglist)
Declare a structure to hold an application's arguments.
struct ao2_iterator ao2_iterator_init(struct ao2_container *c, int flags)
Create an iterator for a container.
int ast_custom_function_unregister(struct ast_custom_function *acf)
Unregister a custom function.
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.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
Data structure associated with a custom dialplan function.
char name[AST_CHANNEL_NAME]
#define AST_MAX_EXTENSION
#define ao2_ref(o, delta)
static int dialgroup_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
Core PBX routines and definitions.
#define ast_strdupa(s)
duplicate a string in memory from the stack
struct ast_db_entry * ast_db_gettree(const char *family, const char *keytree)
Get a list of values within the astdb tree If family is specified, only those keys will be returned...
static int load_module(void)
char name[AST_MAX_EXTENSION]
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
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...
#define ao2_alloc(data_size, destructor_fn)
static int entry_hash_fn(const void *obj, const int flags)
#define ao2_find(arg1, arg2, arg3)
static int entry_cmp_fn(void *obj1, void *name2, int flags)
void ao2_iterator_destroy(struct ao2_iterator *i)
Destroy a container iterator.
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.
#define ao2_container_alloc(arg1, arg2, arg3)
#define ast_realloc(a, b)
Application convenience functions, designed to give consistent look and feel to Asterisk apps...
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.
#define AST_APP_ARG(name)
Define an application argument.
#define AST_STANDARD_APP_ARGS(args, parse)
Performs the 'standard' argument separation process for an application.
static int dialgroup_write(struct ast_channel *chan, const char *cmd, char *data, const char *cvalue)
#define AST_NONSTANDARD_APP_ARGS(args, parse, sep)
Performs the 'nonstandard' argument separation process for an application.
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.
Persistant data storage (akin to *doze registry)
struct ao2_container * entries
#define ao2_unlink(arg1, arg2)
#define ast_custom_function_register(acf)
Register a custom function.
#define ASTERISK_FILE_VERSION(file, version)
Register/unregister a source code file with the core.
static force_inline int attribute_pure ast_str_hash(const char *str)
Compute a hash value on a string.