[Asterisk-code-review] sorcery: Fix cache creation callback. (asterisk[master])

Joshua Colp asteriskteam at digium.com
Tue May 26 07:46:36 CDT 2015


Joshua Colp has uploaded a new change for review.

  https://gerrit.asterisk.org/534

Change subject: sorcery: Fix cache creation callback.
......................................................................

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
---
M main/sorcery.c
1 file changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/34/534/1

diff --git a/main/sorcery.c b/main/sorcery.c
index 732fb62..f84855e 100644
--- a/main/sorcery.c
+++ b/main/sorcery.c
@@ -1822,7 +1822,12 @@
 	}
 
 	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);
 
@@ -2332,4 +2337,4 @@
 const char *ast_sorcery_get_module(const struct ast_sorcery *sorcery)
 {
 	return sorcery->module_name;
-}
\ No newline at end of file
+}

-- 
To view, visit https://gerrit.asterisk.org/534
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e4a5a137cb25292eb52d7a14cbb6daa09213450
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Joshua Colp <jcolp at digium.com>



More information about the asterisk-code-review mailing list