From: Michael Jerris Date: Mon, 8 Jun 2009 14:45:40 +0000 (+0000) Subject: fix div by zero X-Git-Tag: v1.0.4~574 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=389bc359c5b63d91e1e5fe3579a06f236b974964;p=thirdparty%2Ffreeswitch.git fix div by zero git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13669 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/switch_ivr_play_say.c b/src/switch_ivr_play_say.c index d0c6b7fd1d..c40c20af34 100644 --- a/src/switch_ivr_play_say.c +++ b/src/switch_ivr_play_say.c @@ -1379,7 +1379,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "done playing file\n"); - switch_channel_set_variable_printf(channel, "playback_ms", "%d", fh->samples_out / read_impl.samples_per_second); + if (read_impl.samples_per_second) switch_channel_set_variable_printf(channel, "playback_ms", "%d", fh->samples_out / read_impl.samples_per_second); switch_channel_set_variable_printf(channel, "playback_samples", "%d", fh->samples_out); switch_core_file_close(fh);