diff options
Diffstat (limited to 'utils/extconf.c')
-rw-r--r-- | utils/extconf.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/utils/extconf.c b/utils/extconf.c index 3a0b2e97c..8588d1a28 100644 --- a/utils/extconf.c +++ b/utils/extconf.c @@ -4402,6 +4402,31 @@ struct ast_include *localized_walk_context_includes(struct ast_context *con, return ast_walk_context_includes(con, inc); } +static struct ast_ignorepat *ast_walk_context_ignorepats(struct ast_context *con, + struct ast_ignorepat *ip); + +static struct ast_ignorepat *ast_walk_context_ignorepats(struct ast_context *con, + struct ast_ignorepat *ip) +{ + if (!ip) + return con ? con->ignorepats : NULL; + else + return ip->next; +} + +int ast_context_ignorepats_count(struct ast_context *con); +int ast_context_ignorepats_count(struct ast_context *con) +{ + int c = 0; + struct ast_ignorepat *ip = NULL; + + while ((ip = ast_walk_context_ignorepats(con, ip))) { + c++; + } + + return c; +} + static struct ast_sw *ast_walk_context_switches(struct ast_context *con, struct ast_sw *sw); @@ -4423,6 +4448,19 @@ struct ast_sw *localized_walk_context_switches(struct ast_context *con, return ast_walk_context_switches(con, sw); } +int ast_context_switches_count(struct ast_context *con); +int ast_context_switches_count(struct ast_context *con) +{ + int c = 0; + struct ast_sw *sw = NULL; + + while ((sw = ast_walk_context_switches(con, sw))) { + c++; + } + + return c; +} + static struct ast_context *ast_context_find(const char *name); |