[asterisk-commits] res sorcery memory cache: Add test event when a refresh occurs. (asterisk[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 4 09:48:09 CDT 2015


Mark Michelson has submitted this change and it was merged.

Change subject: res_sorcery_memory_cache: Add test event when a refresh occurs.
......................................................................


res_sorcery_memory_cache: Add test event when a refresh occurs.

This change adds a testsuite event for when a refresh occurs.
This is useful as it provides a guaranteed mechanism of knowing when
it has occurred instead of waiting an arbitrary amount of time.

ASTERISK-25067
Reported by: Matt Jordan

Change-Id: Iaa6b8d2d6bab7f99ee08e1c8908b8272a8987e65
---
M res/res_sorcery_memory_cache.c
1 file changed, 4 insertions(+), 0 deletions(-)

Approvals:
  Kevin Harwell: Looks good to me, but someone else must approve
  Mark Michelson: Looks good to me, approved; Verified
  Matt Jordan: Looks good to me, but someone else must approve



diff --git a/res/res_sorcery_memory_cache.c b/res/res_sorcery_memory_cache.c
index d2c648c..57feb8f 100644
--- a/res/res_sorcery_memory_cache.c
+++ b/res/res_sorcery_memory_cache.c
@@ -789,6 +789,10 @@
 			object);
 	}
 
+	ast_test_suite_event_notify("SORCERY_MEMORY_CACHE_REFRESHED", "Cache: %s\r\nType: %s\r\nName: %s\r\n",
+		task_data->cache->name, ast_sorcery_object_get_type(task_data->object),
+		ast_sorcery_object_get_id(task_data->object));
+
 	ao2_ref(task_data, -1);
 	end_stale_update();
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaa6b8d2d6bab7f99ee08e1c8908b8272a8987e65
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>



More information about the asterisk-commits mailing list