]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Sorcery: Log when old config remains in use
authorKinsey Moore <kmoore@digium.com>
Fri, 12 Dec 2014 14:02:30 +0000 (14:02 +0000)
committerKinsey Moore <kmoore@digium.com>
Fri, 12 Dec 2014 14:02:30 +0000 (14:02 +0000)
This adds a log message notifying the user that a stale configuration
is in place upon reload when a config object fails to load. This
situation can end up causing confusion when the object failed to load
but exists from a previous config load especially when the old config
is significantly different from the new config.

Review: https://reviewboard.asterisk.org/r/4250/
Reported by: Thomas Thompson

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@429429 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_sorcery_config.c

index de369d353e7ebcf7c2eccc6d08712979604ff6e5..1e96bfae7942313915dbaf9a81199441674fbdf0 100644 (file)
@@ -284,6 +284,8 @@ static void sorcery_config_internal_load(void *data, const struct ast_sorcery *s
                        if (!(obj = sorcery_config_retrieve_id(sorcery, data, type, id))) {
                                continue;
                        }
+
+                       ast_log(LOG_NOTICE, "Retaining existing configuration for object of type '%s' with id '%s'\n", type, id);
                }
 
                ao2_link_flags(objects, obj, OBJ_NOLOCK);