Add timezone to the possible fields in a timespec.

(closes issue #14028)
 Reported by: mostyn
 Patches: 
       timezone-v2.patch uploaded by mostyn (license 398)
       (with additional code guideline fixes and a memory leak fix by me - license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2008-12-16 22:57:17 +00:00
parent 91b4a30be8
commit 27cbfc1bd5
7 changed files with 192 additions and 131 deletions

View File

@@ -148,6 +148,7 @@ static int iftime(struct ast_channel *chan, const char *cmd, char *data, char *b
if (!ast_build_timing(&timing, expr)) {
ast_log(LOG_WARNING, "Invalid Time Spec.\n");
ast_destroy_timing(&timing);
return -1;
}
@@ -157,6 +158,7 @@ static int iftime(struct ast_channel *chan, const char *cmd, char *data, char *b
iffalse = ast_strip_quoted(iffalse, "\"", "\"");
ast_copy_string(buf, ast_check_timing(&timing) ? iftrue : iffalse, len);
ast_destroy_timing(&timing);
return 0;
}