[Asterisk-code-review] stasis cache: Don't cache stasis subscription change messages (asterisk[16])
George Joseph
asteriskteam at digium.com
Thu Aug 30 13:11:49 CDT 2018
George Joseph has uploaded this change for review. ( https://gerrit.asterisk.org/10025
Change subject: stasis_cache: Don't cache stasis_subscription_change messages
......................................................................
stasis_cache: Don't cache stasis_subscription_change messages
stasis_subscription_change messages can provide useful information
to topic subscribers but caching them makes no sense since they
don't alter the state of the object the topic is related to.
They do however take CPU cycles to manage in the cache and consume
memory in the cache container.
Change-Id: I3d18905e477f3721815da91f30da8d3fbb2d4f56
---
M main/stasis_cache.c
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/25/10025/1
diff --git a/main/stasis_cache.c b/main/stasis_cache.c
index 8c3c7f1..752bb8c 100644
--- a/main/stasis_cache.c
+++ b/main/stasis_cache.c
@@ -813,7 +813,9 @@
}
msg_type = stasis_message_type(message);
- if (stasis_cache_clear_type() == msg_type) {
+ if (stasis_subscription_change_type() == msg_type) {
+ return;
+ } else if (stasis_cache_clear_type() == msg_type) {
/* Cache clear event. */
msg_put = NULL;
msg = stasis_message_data(message);
--
To view, visit https://gerrit.asterisk.org/10025
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d18905e477f3721815da91f30da8d3fbb2d4f56
Gerrit-Change-Number: 10025
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180830/ee35d71f/attachment.html>
More information about the asterisk-code-review
mailing list