From: Joshua Colp Date: Tue, 26 May 2015 12:44:18 +0000 (-0300) Subject: sorcery: Fix cache creation callback. X-Git-Tag: 13.5.0-rc1~119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fchanges%2F33%2F533%2F1;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: I3e4a5a137cb25292eb52d7a14cbb6daa09213450 --- diff --git a/main/sorcery.c b/main/sorcery.c index af6de7e82c..8101af055e 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);