summaryrefslogtreecommitdiff
path: root/main/config.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2008-03-26 19:19:31 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2008-03-26 19:19:31 +0000
commite6fc9ae52cceaf321d8ed834d6e191d83212b422 (patch)
tree055f1fd6797ddb44d8650d54d9e4f0eda5fb5836 /main/config.c
parentdd2700d0b12fd4b37615137462b9c805172b1569 (diff)
Add a linkedlist macro that maintains a sorted list
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@111036 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/config.c')
-rw-r--r--main/config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/config.c b/main/config.c
index 29e2e123e..ec917d3e3 100644
--- a/main/config.c
+++ b/main/config.c
@@ -878,7 +878,7 @@ static void config_cache_attribute(const char *configfile, enum config_cache_att
cfmtime->who_asked = cfmtime->filename + strlen(configfile) + 1;
strcpy(cfmtime->who_asked, who_asked);
/* Note that the file mtime is initialized to 0, i.e. 1970 */
- AST_LIST_INSERT_TAIL(&cfmtime_head, cfmtime, list);
+ AST_LIST_INSERT_SORTALPHA(&cfmtime_head, cfmtime, list, filename);
}
if (!stat(configfile, &statbuf))
@@ -1211,7 +1211,7 @@ static struct ast_config *config_text_file_load(const char *database, const char
cfmtime->who_asked = cfmtime->filename + strlen(fn) + 1;
strcpy(cfmtime->who_asked, who_asked);
/* Note that the file mtime is initialized to 0, i.e. 1970 */
- AST_LIST_INSERT_TAIL(&cfmtime_head, cfmtime, list);
+ AST_LIST_INSERT_SORTALPHA(&cfmtime_head, cfmtime, list, filename);
}
}