mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-20 20:44:20 +00:00
automerge commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@46990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
5
logger.c
5
logger.c
@@ -875,10 +875,8 @@ void ast_verbose(const char *fmt, ...)
|
|||||||
if (complete) {
|
if (complete) {
|
||||||
if (msgcnt < MAX_MSG_QUEUE) {
|
if (msgcnt < MAX_MSG_QUEUE) {
|
||||||
/* Allocate new structure */
|
/* Allocate new structure */
|
||||||
if ((m = malloc(sizeof(*m)))) {
|
if ((m = calloc(1, sizeof(*m))))
|
||||||
m->msg = NULL;
|
|
||||||
msgcnt++;
|
msgcnt++;
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
/* Recycle the oldest entry */
|
/* Recycle the oldest entry */
|
||||||
m = list;
|
m = list;
|
||||||
@@ -887,7 +885,6 @@ void ast_verbose(const char *fmt, ...)
|
|||||||
free(m->msg);
|
free(m->msg);
|
||||||
}
|
}
|
||||||
if (m) {
|
if (m) {
|
||||||
m->msg = NULL;
|
|
||||||
m->msg = strdup(stuff);
|
m->msg = strdup(stuff);
|
||||||
if (m->msg) {
|
if (m->msg) {
|
||||||
if (last)
|
if (last)
|
||||||
|
@@ -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))
|
if ((strlen(files_dirent->d_name) < 4) || ((strlen(files_dirent->d_name) + dirnamelen) >= MAX_MOHFILE_LEN))
|
||||||
continue;
|
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);
|
snprintf(filepath, MAX_MOHFILE_LEN, "%s/%s", class->dir, files_dirent->d_name);
|
||||||
|
|
||||||
if (stat(filepath, &statbuf))
|
if (stat(filepath, &statbuf))
|
||||||
|
Reference in New Issue
Block a user