mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user