From 0fcc530dc7e8f1e83b5511f01954c29b9cc28e23 Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Tue, 26 May 2015 09:44:18 -0300 Subject: [PATCH] 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: Id2a9e5f271c466686e6d0def461fa50c8b2cae53 --- main/sorcery.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main/sorcery.c b/main/sorcery.c index b89fabd6f6..d0b46c5b45 100644 --- a/main/sorcery.c +++ b/main/sorcery.c @@ -1723,7 +1723,12 @@ void *ast_sorcery_retrieve_by_id(const struct ast_sorcery *sorcery, const char * ao2_iterator_destroy(&i); if (!cached && object) { - ao2_callback(object_type->wizards, 0, sorcery_cache_create, object); + struct sorcery_details sdetails = { + .sorcery = sorcery, + .obj = object, + }; + + ao2_callback(object_type->wizards, 0, sorcery_cache_create, &sdetails); } return object; -- 2.47.2