summaryrefslogtreecommitdiff
path: root/main/stasis_cache.c
diff options
context:
space:
mode:
authorMatt Jordan <mjordan@digium.com>2017-03-14 09:37:34 -0500
committerMatt Jordan <mjordan@digium.com>2017-03-14 08:40:54 -0600
commitb03b72717f6d312f6ed106c1eff16581992ba5ef (patch)
treebccace4e1a0f5656f1d11e176408673dbc15ab4e /main/stasis_cache.c
parentd1ef127084786e171f38b5b875ee984c5a5eb544 (diff)
main/stasis_cache: Demote the ERROR message when removing a nonexistent item
This patch demotes the ERROR message that is displayed when a nonexistent item is removed from the Stasis cache. The genesis of this demotion is due to chan_sip's realtime peers and their interaction with Asterisk's core ast_endpoint code, but ostensibly it could happen from other channel drivers as well. Since Mark Michelson already did an excellent job of explaining on this issue, it is quoted here for posterity: "Internally, when a realtime peer is retrieved, Asterisk creates an ast_endpoint structure. When that peer is destroyed, the ast_endpoint is destroyed as well. Part of the destruction of the ast_endpoint involves clearing the Stasis cache of all information about that endpoint. The problem here is that the act of creating the ast_endpoint is not enough to actually put any information in the Stasis cache. Instead, something has to happen, such as a state change, in order for the Stasis cache to have any information about that endpoint. When a device registers, chan_sip creates an ast_endpoint structure, processes the REGISTER, and then destroys the ast_endpoint. When the ast_endpoint is destroyed, there is nothing to destroy in the Stasis cache, so an error message is emitted. When you use rtcachefriends, ast_endpoint structures persist for the lifetime of the module and so you do not see this error message." ASTERISK-25237 #close Change-Id: I53cebc6b4a897a1ab9564182b75c177780feff70
Diffstat (limited to 'main/stasis_cache.c')
-rw-r--r--main/stasis_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/stasis_cache.c b/main/stasis_cache.c
index e632a21b0..ce4e0232f 100644
--- a/main/stasis_cache.c
+++ b/main/stasis_cache.c
@@ -840,7 +840,7 @@ static void caching_topic_exec(void *data, struct stasis_subscription *sub,
}
ao2_cleanup(update);
} else {
- ast_log(LOG_ERROR,
+ ast_debug(1,
"Attempting to remove an item from the %s cache that isn't there: %s %s\n",
stasis_topic_name(caching_topic->topic),
stasis_message_type_name(msg_type), msg_id);