summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/conf2ael.c4
-rw-r--r--utils/extconf.c13
2 files changed, 15 insertions, 2 deletions
diff --git a/utils/conf2ael.c b/utils/conf2ael.c
index 76a3ad3f2..8b2043082 100644
--- a/utils/conf2ael.c
+++ b/utils/conf2ael.c
@@ -664,8 +664,8 @@ struct ast_exten *ast_walk_context_extensions(struct ast_context *con, struct as
return NULL;
}
-struct ast_include *ast_walk_context_includes(struct ast_context *con, struct ast_include *inc);
-struct ast_include *ast_walk_context_includes(struct ast_context *con, struct ast_include *inc)
+const struct ast_include *ast_walk_context_includes(const struct ast_context *con, const struct ast_include *inc);
+const struct ast_include *ast_walk_context_includes(const struct ast_context *con, const struct ast_include *inc)
{
return NULL;
}
diff --git a/utils/extconf.c b/utils/extconf.c
index 48053aed6..3a0b2e97c 100644
--- a/utils/extconf.c
+++ b/utils/extconf.c
@@ -4381,6 +4381,19 @@ static struct ast_include *ast_walk_context_includes(struct ast_context *con,
return inc->next;
}
+int ast_context_includes_count(struct ast_context *con);
+int ast_context_includes_count(struct ast_context *con)
+{
+ int c = 0;
+ struct ast_include *inc = NULL;
+
+ while ((inc = ast_walk_context_includes(con, inc))) {
+ c++;
+ }
+
+ return c;
+}
+
struct ast_include *localized_walk_context_includes(struct ast_context *con,
struct ast_include *inc);
struct ast_include *localized_walk_context_includes(struct ast_context *con,