mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
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
This commit is contained in:
@@ -1822,7 +1822,12 @@ void *ast_sorcery_retrieve_by_id(const struct ast_sorcery *sorcery, const char *
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!cached && object) {
|
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);
|
AST_VECTOR_RW_UNLOCK(&object_type->wizards);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user