From 86242db094459b78e7c79412e7c9c21cd4a94d45 Mon Sep 17 00:00:00 2001 From: Raymond Chandler Date: Mon, 14 Jan 2013 21:31:59 -0500 Subject: [PATCH] don't seg if we forget milliseconds on pause tag --- src/mod/applications/mod_httapi/mod_httapi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mod/applications/mod_httapi/mod_httapi.c b/src/mod/applications/mod_httapi/mod_httapi.c index 617a07baa0..8d0b2ae294 100644 --- a/src/mod/applications/mod_httapi/mod_httapi.c +++ b/src/mod/applications/mod_httapi/mod_httapi.c @@ -422,8 +422,10 @@ static switch_status_t parse_playback(const char *tag_name, client_t *client, sw speak = 1; } else if (!strcasecmp(tag_name, "pause")) { const char *ms_ = switch_xml_attr(tag, "milliseconds"); - pause = atoi(ms_); - if (pause < 0) pause = 1000; + if (!zstr(ms_)) { + pause = atoi(ms_); + } + if (pause <= 0) pause = 1000; } else if (!strcasecmp(tag_name, "playback")) { sp_engine = switch_xml_attr(tag, "asr-engine"); sp_grammar = switch_xml_attr(tag, "asr-grammar");