From: Michael Jerris Date: Thu, 2 Oct 2008 19:41:46 +0000 (+0000) Subject: MODFORM-16 fix seg when no timer name specified in config file. X-Git-Tag: v1.0.2~991 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40fd65e7137e0371cf41f5297e2a79e581f5b5b8;p=thirdparty%2Ffreeswitch.git MODFORM-16 fix seg when no timer name specified in config file. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9801 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/formats/mod_local_stream/mod_local_stream.c b/src/mod/formats/mod_local_stream/mod_local_stream.c index de0b58d7d4..ca567cda94 100644 --- a/src/mod/formats/mod_local_stream/mod_local_stream.c +++ b/src/mod/formats/mod_local_stream/mod_local_stream.c @@ -578,7 +578,6 @@ SWITCH_STANDARD_API(start_local_stream_function) if (!SWITCH_ACCEPTABLE_INTERVAL(interval)){ interval = 20; } - timer_name = argv[7] ? argv[7] : "soft"; if (!path){ if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) { @@ -667,7 +666,7 @@ SWITCH_STANDARD_API(start_local_stream_function) source->rate = rate; source->interval = interval; source->channels = channels; - source->timer_name = switch_core_strdup(source->pool, timer_name); + source->timer_name = switch_core_strdup(source->pool, timer_name ? timer_name : (argv[7] ? argv[7] : "soft")); source->prebuf = prebuf; source->stopped = 0;