summaryrefslogtreecommitdiff
path: root/main/stdtime
diff options
context:
space:
mode:
authorAutomerge script <automerge@asterisk.org>2012-12-03 21:19:40 +0000
committerAutomerge script <automerge@asterisk.org>2012-12-03 21:19:40 +0000
commitd53adbe4499ee227c09a00490e4aaee6d95eca0d (patch)
treed95670ff0cffdd7677d63b9651a68f5455f90650 /main/stdtime
parentaea70ddc83df9b6542df1b87c43f17c7917200dc (diff)
Merged revisions 377138 via svnmerge from
file:///srv/subversion/repos/asterisk/trunk ................ r377138 | rmudgett | 2012-12-03 14:46:11 -0600 (Mon, 03 Dec 2012) | 23 lines Cleanup core main on exit. * Cleanup time zones on exit. * Make exit clean/unclean report consistent for AMI and CLI in really_quit(). (issue ASTERISK-20649) Reported by: Corey Farrell Patches: core-cleanup-1_8-10.patch (license #5909) patch uploaded by Corey Farrell core-cleanup-11-trunk.patch (license #5909) patch uploaded by Corey Farrell Modified ........ Merged revisions 377135 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 377136 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 377137 from http://svn.asterisk.org/svn/asterisk/branches/11 ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377145 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/stdtime')
-rw-r--r--main/stdtime/localtime.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/main/stdtime/localtime.c b/main/stdtime/localtime.c
index 36559f151..f7b4bd005 100644
--- a/main/stdtime/localtime.c
+++ b/main/stdtime/localtime.c
@@ -71,6 +71,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "private.h"
#include "tzfile.h"
+#include "asterisk/_private.h"
#include "asterisk/lock.h"
#include "asterisk/localtime.h"
#include "asterisk/strings.h"
@@ -444,7 +445,7 @@ static void *kqueue_daemon(void *data)
closedir(sp->dir);
}
#endif
- free(sp);
+ ast_free(sp);
/* Just in case the signal was sent late */
AST_LIST_LOCK(&zonelist);
@@ -1436,6 +1437,17 @@ static int gmtload(struct state *sp)
return -1;
}
+void clean_time_zones(void)
+{
+ struct state *sp;
+
+ AST_LIST_LOCK(&zonelist);
+ while ((sp = AST_LIST_REMOVE_HEAD(&zonelist, list))) {
+ ast_free(sp);
+ }
+ AST_LIST_UNLOCK(&zonelist);
+}
+
static const struct state *ast_tzset(const char *zone)
{
struct state *sp;