[Asterisk-code-review] stasis cache: Ignore subscription changes in caching topic e... (asterisk[master])
Corey Farrell
asteriskteam at digium.com
Tue Jan 2 10:36:55 CST 2018
Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/7788
Change subject: stasis_cache: Ignore subscription changes in caching_topic_exec.
......................................................................
stasis_cache: Ignore subscription changes in caching_topic_exec.
Ignore stasis_subscription_change_type in caching_topic_exec to avoid a
memory leak.
ASTERISK-27121 #close
patches:
fix_27121.patch by Sergej Kasumovic (license 6895)
Change-Id: I6d502284730d243a217f91666616a27eba7995b0
---
M main/stasis_cache.c
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/88/7788/1
diff --git a/main/stasis_cache.c b/main/stasis_cache.c
index 3bcf0c4..9d81ada 100644
--- a/main/stasis_cache.c
+++ b/main/stasis_cache.c
@@ -806,13 +806,17 @@
ast_assert(caching_topic->cache != NULL);
ast_assert(caching_topic->cache->id_fn != NULL);
+ msg_type = stasis_message_type(message);
+ if (stasis_subscription_change_type() == msg_type) {
+ return;
+ }
+
if (stasis_subscription_final_message(sub, message)) {
caching_topic_needs_unref = caching_topic;
} else {
caching_topic_needs_unref = NULL;
}
- msg_type = stasis_message_type(message);
if (stasis_cache_clear_type() == msg_type) {
/* Cache clear event. */
msg_put = NULL;
--
To view, visit https://gerrit.asterisk.org/7788
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d502284730d243a217f91666616a27eba7995b0
Gerrit-Change-Number: 7788
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180102/a5827dde/attachment-0001.html>
More information about the asterisk-code-review
mailing list