]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
whoops.
authorMichael Jerris <mike@jerris.com>
Tue, 5 Feb 2008 16:10:07 +0000 (16:10 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 5 Feb 2008 16:10:07 +0000 (16:10 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7523 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr_async.c

index f22720c1d620d641d0378124de977135fdd62fe1..8b56fe6e101b819f73249a9798d5f56dec730a47 100644 (file)
@@ -965,7 +965,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_stop_inband_dtmf_generate_session(swi
 SWITCH_DECLARE(switch_status_t) switch_ivr_inband_dtmf_generate_session(switch_core_session_t *session, switch_bool_t read_stream)
 {
        switch_channel_t *channel = switch_core_session_get_channel(session);
-       switch_codec_t *read_codec = switch_core_session_get_read_codec(session);
+       switch_codec_t *read_codec;
        switch_media_bug_t *bug;
        switch_status_t status;
        switch_inband_dtmf_generate_t *pvt;
@@ -975,6 +975,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_inband_dtmf_generate_session(switch_c
                return status;
        }
 
+       read_codec = switch_core_session_get_read_codec(session);
+
        if (!read_codec) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can not install inband dtmf generate.  No read codec.!\n");
                return SWITCH_STATUS_FALSE;