summaryrefslogtreecommitdiff
path: root/main/sorcery.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2015-05-16 19:02:50 -0300
committerJoshua Colp <jcolp@digium.com>2015-05-22 09:28:24 -0500
commitf2cc766d817191c79b97668a67a203fe7cf1c588 (patch)
tree5474d9964c7ec1b0ef30af0ab69a6e2514d98267 /main/sorcery.c
parent44d82b9479635ed2183e556309fb20a0f305765c (diff)
res_sorcery_memory_cache: Add basic module implementation.
This change adds a basic res_sorcery_memory_cache module which implements configuration option parsing, configuration file parsing for threading, sorcery interface implementation, and unit tests. Objects can be added, updated, deleted, and retrieved from the memory cache. Automatic expiration and stale handling will be added in the future. Note that unit tests exist within the module itself in case the threading done as a result of expiration results in asynchronous actions (which it likely will). Providing access and a notification mechanism for an external test module would be complicated and not worth it. ASTERISK-25067 #close Reported by: Matt Jordan Change-Id: Id8a6a357ef5a83d466f81eee56a67d13eeb118b9
Diffstat (limited to 'main/sorcery.c')
-rw-r--r--main/sorcery.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/main/sorcery.c b/main/sorcery.c
index c77954897..732fb62ae 100644
--- a/main/sorcery.c
+++ b/main/sorcery.c
@@ -2328,3 +2328,8 @@ int ast_sorcery_is_object_field_registered(const struct ast_sorcery_object_type
ao2_cleanup(object_field);
return res;
}
+
+const char *ast_sorcery_get_module(const struct ast_sorcery *sorcery)
+{
+ return sorcery->module_name;
+} \ No newline at end of file