[asterisk-commits] file: branch file/sorcery r378710 - in /team/file/sorcery: include/asterisk/ ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 9 09:27:20 CST 2013


Author: file
Date: Wed Jan  9 09:27:17 2013
New Revision: 378710

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=378710
Log:
Make the sorcery structure available to the apply callback so that you could, oh I dunno, retrieve an existing object!

Modified:
    team/file/sorcery/include/asterisk/sorcery.h
    team/file/sorcery/main/sorcery.c

Modified: team/file/sorcery/include/asterisk/sorcery.h
URL: http://svnview.digium.com/svn/asterisk/team/file/sorcery/include/asterisk/sorcery.h?view=diff&rev=378710&r1=378709&r2=378710
==============================================================================
--- team/file/sorcery/include/asterisk/sorcery.h (original)
+++ team/file/sorcery/include/asterisk/sorcery.h Wed Jan  9 09:27:17 2013
@@ -156,9 +156,10 @@
 /*!
  * \brief A callback function for when an object set is successfully applied to an object
  *
+ * \param sorcery Sorcery structure in use
  * \param obj The object itself
  */
-typedef void (*sorcery_apply_handler)(void *obj);
+typedef void (*sorcery_apply_handler)(const struct ast_sorcery *sorcery, void *obj);
 
 /*! \brief Interface for a sorcery wizard */
 struct ast_sorcery_wizard {

Modified: team/file/sorcery/main/sorcery.c
URL: http://svnview.digium.com/svn/asterisk/team/file/sorcery/main/sorcery.c?view=diff&rev=378710&r1=378709&r2=378710
==============================================================================
--- team/file/sorcery/main/sorcery.c (original)
+++ team/file/sorcery/main/sorcery.c Wed Jan  9 09:27:17 2013
@@ -664,7 +664,7 @@
 	}
 
 	if (!res && object_type->apply) {
-		object_type->apply(object);
+		object_type->apply(sorcery, object);
 	}
 
 	return res;




More information about the asterisk-commits mailing list