aboutsummaryrefslogtreecommitdiffstats
path: root/main/config.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-26 19:19:31 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-26 19:19:31 +0000
commit7deaedf968adf8b016c54e505378878ffcbcaead (patch)
tree055f1fd6797ddb44d8650d54d9e4f0eda5fb5836 /main/config.c
parent2024fbae3fe21fcd1f9ab5c7215791ed57f959fe (diff)
Add a linkedlist macro that maintains a sorted list
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@111036 f38db490-d61c-443f-a65b-d21fe96a405b
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);
}
}