summaryrefslogtreecommitdiff
path: root/include/asterisk/sorcery.h
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2015-06-15 15:28:00 -0500
committerRichard Mudgett <rmudgett@digium.com>2015-06-25 14:30:48 -0500
commit9ec8a0f3ccdb0e308ed480aff3ad1e1c9a82f674 (patch)
treeac88bad1b55277a92b76b40ff80efcccfb1d39fc /include/asterisk/sorcery.h
parent77ff7325a221160f0aef856a282ae6de6f5d8088 (diff)
sorcery: Add ast_sorcery_object_unregister() API call.
Find and unlink the specified sorcery object type to complement ast_sorcery_object_register(). Without this function you cannot completely unload individual modules that use sorcery for configuration. ASTERISK-24907 Reported by: Kevin Harwell Change-Id: I1c04634fe9a90921bf676725c7d6bb2aeaab1c88
Diffstat (limited to 'include/asterisk/sorcery.h')
-rw-r--r--include/asterisk/sorcery.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asterisk/sorcery.h b/include/asterisk/sorcery.h
index d2dc701d8..0bd22a634 100644
--- a/include/asterisk/sorcery.h
+++ b/include/asterisk/sorcery.h
@@ -617,6 +617,17 @@ int ast_sorcery_get_wizard_mapping(struct ast_sorcery *sorcery,
const char *type, int index, struct ast_sorcery_wizard **wizard, void **data);
/*!
+ * \brief Unregister an object type
+ *
+ * \param sorcery Pointer to a sorcery structure
+ * \param type Type of object
+ *
+ * \retval 0 success
+ * \retval -1 failure
+ */
+int ast_sorcery_object_unregister(struct ast_sorcery *sorcery, const char *type);
+
+/*!
* \brief Register an object type
*
* \param sorcery Pointer to a sorcery structure