From: Joshua Colp Date: Tue, 26 May 2015 12:44:18 +0000 (-0300) Subject: sorcery: Fix cache creation callback. X-Git-Tag: certified/13.1-cert3~111 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0fcc530dc7e8f1e83b5511f01954c29b9cc28e23;p=thirdparty%2Fasterisk.git 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 --- 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;