]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Issue 6710: saydate crash. Fix by Luigi Rizzo. Thanks!
authorOlle Johansson <oej@edvina.net>
Mon, 13 Mar 2006 09:02:55 +0000 (09:02 +0000)
committerOlle Johansson <oej@edvina.net>
Mon, 13 Mar 2006 09:02:55 +0000 (09:02 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@12740 65c4cc65-6c06-0410-ace0-fbb531ad65f3

say.c

diff --git a/say.c b/say.c
index ff881c78700e4478878092b16e245cc3e5c436b3..4f8f380f8298b919594e7ac5a4e7cbd4ceb4fb0e 100644 (file)
--- a/say.c
+++ b/say.c
@@ -2949,6 +2949,10 @@ int ast_say_date_pt(struct ast_channel *chan, time_t t, const char *ints, const
 
 int ast_say_date_with_format(struct ast_channel *chan, time_t time, const char *ints, const char *lang, const char *format, const char *timezone)
 {
+       /* If no format is given, use default english format */
+       if (format == NULL)
+               format = "ABdY 'digits/at' IMp";
+
        if (!strcasecmp(lang, "en") ) { /* English syntax */
                return(ast_say_date_with_format_en(chan, time, ints, lang, format, timezone));
        } else if (!strcasecmp(lang, "da") ) {  /* Danish syntax */