summaryrefslogtreecommitdiff
path: root/res/ari/resource_endpoints.c
diff options
context:
space:
mode:
Diffstat (limited to 'res/ari/resource_endpoints.c')
-rw-r--r--res/ari/resource_endpoints.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/res/ari/resource_endpoints.c b/res/ari/resource_endpoints.c
index bb28df03c..35d8a45cc 100644
--- a/res/ari/resource_endpoints.c
+++ b/res/ari/resource_endpoints.c
@@ -37,22 +37,22 @@ void ast_ari_get_endpoints(struct ast_variable *headers,
struct ast_get_endpoints_args *args,
struct ast_ari_response *response)
{
- RAII_VAR(struct stasis_caching_topic *, caching_topic, NULL, ao2_cleanup);
+ RAII_VAR(struct stasis_cache *, cache, NULL, ao2_cleanup);
RAII_VAR(struct ao2_container *, snapshots, NULL, ao2_cleanup);
RAII_VAR(struct ast_json *, json, NULL, ast_json_unref);
struct ao2_iterator i;
void *obj;
- caching_topic = ast_endpoint_topic_all_cached();
- if (!caching_topic) {
+ cache = ast_endpoint_cache();
+ if (!cache) {
ast_ari_response_error(
response, 500, "Internal Server Error",
"Message bus not initialized");
return;
}
- ao2_ref(caching_topic, +1);
+ ao2_ref(cache, +1);
- snapshots = stasis_cache_dump(caching_topic, ast_endpoint_snapshot_type());
+ snapshots = stasis_cache_dump(cache, ast_endpoint_snapshot_type());
if (!snapshots) {
ast_ari_response_alloc_failed(response);
return;
@@ -83,7 +83,7 @@ void ast_ari_get_endpoints_by_tech(struct ast_variable *headers,
struct ast_get_endpoints_by_tech_args *args,
struct ast_ari_response *response)
{
- RAII_VAR(struct stasis_caching_topic *, caching_topic, NULL, ao2_cleanup);
+ RAII_VAR(struct stasis_cache *, cache, NULL, ao2_cleanup);
RAII_VAR(struct ao2_container *, snapshots, NULL, ao2_cleanup);
RAII_VAR(struct ast_json *, json, NULL, ast_json_unref);
struct ao2_iterator i;
@@ -91,16 +91,16 @@ void ast_ari_get_endpoints_by_tech(struct ast_variable *headers,
/* TODO - if tech isn't a recognized type of endpoint, it should 404 */
- caching_topic = ast_endpoint_topic_all_cached();
- if (!caching_topic) {
+ cache = ast_endpoint_cache();
+ if (!cache) {
ast_ari_response_error(
response, 500, "Internal Server Error",
"Message bus not initialized");
return;
}
- ao2_ref(caching_topic, +1);
+ ao2_ref(cache, +1);
- snapshots = stasis_cache_dump(caching_topic, ast_endpoint_snapshot_type());
+ snapshots = stasis_cache_dump(cache, ast_endpoint_snapshot_type());
if (!snapshots) {
ast_ari_response_alloc_failed(response);
return;