diff options
author | Joshua Colp <jcolp@digium.com> | 2015-05-26 09:44:18 -0300 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2015-05-26 07:46:36 -0500 |
commit | a7af6bca3cb434e75c6ac2fbb0ed45208295b15d (patch) | |
tree | 1ec650a20a76e1ac55321442782e2a0578157d5b /main/sorcery.c | |
parent | e1a64e021b3d8ee7eb4519beb3739b395479b540 (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/sorcery.c')
-rw-r--r-- | main/sorcery.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/main/sorcery.c b/main/sorcery.c index 732fb62ae..f84855eff 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); @@ -2332,4 +2337,4 @@ int ast_sorcery_is_object_field_registered(const struct ast_sorcery_object_type const char *ast_sorcery_get_module(const struct ast_sorcery *sorcery) { return sorcery->module_name; -}
\ No newline at end of file +} |