diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/conf2ael.c | 6 | ||||
-rw-r--r-- | utils/extconf.c | 13 |
2 files changed, 13 insertions, 6 deletions
diff --git a/utils/conf2ael.c b/utils/conf2ael.c index f0cb83f30..3136fe378 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_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) -{ - return NULL; -} - struct ast_exten *pbx_find_extension(struct ast_channel *chan, struct ast_context *bypass, struct pbx_find_info *q, diff --git a/utils/extconf.c b/utils/extconf.c index 049882334..8588d1a28 100644 --- a/utils/extconf.c +++ b/utils/extconf.c @@ -4448,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); |