Add schedule extensions to app_meetme. In addition, the reporter found a

problem within strptime(3), which we are correcting here with ast_strptime().
(closes issue #11040)
 Reported by: DEA
 Patches: 
       20080910__bug11040.diff.txt uploaded by Corydon76 (license 14)
 Tested by: DEA


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@145649 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2008-10-01 23:02:25 +00:00
parent 7eae109418
commit 529874de7b
4 changed files with 410 additions and 138 deletions

View File

@@ -1819,3 +1819,15 @@ defcase: *fptr++ = *tmp;
return res;
}
char *ast_strptime(const char *s, const char *format, struct ast_tm *tm)
{
struct tm tm2 = { 0, };
char *res = strptime(s, format, &tm2);
memcpy(tm, &tm2, sizeof(*tm));
tm->tm_usec = 0;
/* strptime(3) doesn't set .tm_isdst correctly, so to force ast_mktime(3)
* to deal with it correctly, we set it to -1. */
tm->tm_isdst = -1;
return res;
}