mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Pass the sorcery instance to wizards for CUD operations as well as retrieve.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -138,7 +138,7 @@ static void test_apply_handler(const struct ast_sorcery *sorcery, void *obj)
|
||||
/*! \brief Global scope caching structure for testing */
|
||||
static struct sorcery_test_caching cache = { 0, };
|
||||
|
||||
static int sorcery_test_create(void *data, void *object)
|
||||
static int sorcery_test_create(const struct ast_sorcery *sorcery, void *data, void *object)
|
||||
{
|
||||
cache.created = 1;
|
||||
cache.updated = 0;
|
||||
@@ -151,13 +151,13 @@ static void *sorcery_test_retrieve_id(const struct ast_sorcery *sorcery, void *d
|
||||
return (cache.created && !cache.deleted) ? ast_sorcery_alloc(sorcery, type, id) : NULL;
|
||||
}
|
||||
|
||||
static int sorcery_test_update(void *data, void *object)
|
||||
static int sorcery_test_update(const struct ast_sorcery *sorcery, void *data, void *object)
|
||||
{
|
||||
cache.updated = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sorcery_test_delete(void *data, void *object)
|
||||
static int sorcery_test_delete(const struct ast_sorcery *sorcery, void *data, void *object)
|
||||
{
|
||||
cache.deleted = 1;
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user