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

Mark Michelson asteriskteam at digium.com
Wed Jul 8 16:32:20 CDT 2015


Mark Michelson has uploaded a new change for review.

  https://gerrit.asterisk.org/841

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: Id2a9e5f271c466686e6d0def461fa50c8b2cae53
---
M main/sorcery.c
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/41/841/1

diff --git a/main/sorcery.c b/main/sorcery.c
index b89fabd..d0b46c5 100644
--- a/main/sorcery.c
+++ b/main/sorcery.c
@@ -1723,7 +1723,12 @@
 	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;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id2a9e5f271c466686e6d0def461fa50c8b2cae53
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: certified/13.1
Gerrit-Owner: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-code-review mailing list