Close logging stuff so system doesn't have to (bug #1855)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-06-17 01:13:10 +00:00
parent dd4aba8022
commit 702b8a96b0
3 changed files with 27 additions and 0 deletions

View File

@@ -428,6 +428,25 @@ int init_logger(void)
return -1;
}
void close_logger(void)
{
struct msglist *m, *tmp;
m = list;
ast_mutex_lock(&msglist_lock);
while(m) {
if (m->msg) {
free(m->msg);
}
tmp = m->next;
free(m);
m = tmp;
}
list = last = NULL;
ast_mutex_unlock(&msglist_lock);
return;
}
static void ast_log_vsyslog(int level, const char *file, int line, const char *function, const char *fmt, va_list args) {
char buf[BUFSIZ];