summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2015-05-26 09:44:18 -0300
committerJoshua Colp <jcolp@digium.com>2015-05-26 09:44:18 -0300
commit5a42397018f8b850b3901de0a09b8befad602b37 (patch)
treec14afa2a252359b8a181f2c4876eb6f2eff0bd64 /main
parentb9826bf101b238aa704d56af29925a571f8bcb1b (diff)
sorcery: Fix cache creation callback.
The cache creation callback function expects to receive a sorcery_details structure and not just a standalone object. Change-Id: I3e4a5a137cb25292eb52d7a14cbb6daa09213450
Diffstat (limited to 'main')
-rw-r--r--main/sorcery.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/main/sorcery.c b/main/sorcery.c
index af6de7e82..8101af055 100644
--- a/main/sorcery.c
+++ b/main/sorcery.c
@@ -1822,7 +1822,12 @@ void *ast_sorcery_retrieve_by_id(const struct ast_sorcery *sorcery, const char *
}
if (!cached && object) {
- AST_VECTOR_CALLBACK(&object_type->wizards, sorcery_cache_create, NULL, object, 0);
+ struct sorcery_details sdetails = {
+ .sorcery = sorcery,
+ .obj = object,
+ };
+
+ AST_VECTOR_CALLBACK(&object_type->wizards, sorcery_cache_create, NULL, &sdetails, 0);
}
AST_VECTOR_RW_UNLOCK(&object_type->wizards);