diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/conf2ael.c | 6 | ||||
-rw-r--r-- | utils/extconf.c | 25 |
2 files changed, 25 insertions, 6 deletions
diff --git a/utils/conf2ael.c b/utils/conf2ael.c index 8b2043082..f0cb83f30 100644 --- a/utils/conf2ael.c +++ b/utils/conf2ael.c @@ -670,12 +670,6 @@ const struct ast_include *ast_walk_context_includes(const struct ast_context *co return NULL; } -struct ast_ignorepat *ast_walk_context_ignorepats(struct ast_context *con, struct ast_ignorepat *ip); -struct ast_ignorepat *ast_walk_context_ignorepats(struct ast_context *con, struct ast_ignorepat *ip) -{ - return NULL; -} - struct ast_sw *ast_walk_context_switches(struct ast_context *con, struct ast_sw *sw); struct ast_sw *ast_walk_context_switches(struct ast_context *con, struct ast_sw *sw) { diff --git a/utils/extconf.c b/utils/extconf.c index 3a0b2e97c..049882334 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); |