diff options
author | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-02 18:05:19 +0000 |
---|---|---|
committer | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-02 18:05:19 +0000 |
commit | 476ed07a1111e6172eb4f860ad239d3ef7bb5f49 (patch) | |
tree | 8f628c4f321acf2d73b76226a38e4bc43ace0f62 | |
parent | bfd3a35dbb6588e81047ec1e0653aed14638385a (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@46990 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | logger.c | 5 | ||||
-rw-r--r-- | res/res_musiconhold.c | 4 |
2 files changed, 5 insertions, 4 deletions
@@ -875,10 +875,8 @@ void ast_verbose(const char *fmt, ...) if (complete) { if (msgcnt < MAX_MSG_QUEUE) { /* Allocate new structure */ - if ((m = malloc(sizeof(*m)))) { - m->msg = NULL; + if ((m = calloc(1, sizeof(*m)))) msgcnt++; - } } else { /* Recycle the oldest entry */ m = list; @@ -887,7 +885,6 @@ void ast_verbose(const char *fmt, ...) free(m->msg); } if (m) { - m->msg = NULL; m->msg = strdup(stuff); if (m->msg) { if (last) diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index 9972889f8..6c0c380bd 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -772,6 +772,10 @@ static int moh_scan_files(struct mohclass *class) { if ((strlen(files_dirent->d_name) < 4) || ((strlen(files_dirent->d_name) + dirnamelen) >= MAX_MOHFILE_LEN)) continue; + /* Skip files that start with a dot */ + if (files_dirent->d_name[0] == '.') + continue; + snprintf(filepath, MAX_MOHFILE_LEN, "%s/%s", class->dir, files_dirent->d_name); if (stat(filepath, &statbuf)) |