]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge script <automerge@asterisk.org>
Thu, 2 Nov 2006 18:05:19 +0000 (18:05 +0000)
committerAutomerge script <automerge@asterisk.org>
Thu, 2 Nov 2006 18:05:19 +0000 (18:05 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@46990 65c4cc65-6c06-0410-ace0-fbb531ad65f3

logger.c
res/res_musiconhold.c

index fcc0797ad15afa472f3a06c4c043d7aeb28ea572..6bfc5eae18dbc896286e9135a5cf66216cf9c2b4 100644 (file)
--- a/logger.c
+++ b/logger.c
@@ -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)
index 9972889f89be90663e435b83dcecb66aa90942a0..6c0c380bd15f3639ef2c125df476e43360889eeb 100644 (file)
@@ -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))