git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8278 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-05-06 21:05:38 +00:00
parent 9c8c1c2802
commit 269fdac157
3 changed files with 11 additions and 0 deletions

View File

@ -186,6 +186,8 @@ struct switch_runtime {
char *mailer_app_args;
uint32_t max_dtmf_duration;
uint32_t default_dtmf_duration;
switch_frame_t dummy_cng_frame;
char dummy_data[5];
};
extern struct switch_runtime runtime;

View File

@ -842,6 +842,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switc
memset(&runtime, 0, sizeof(runtime));
runtime.dummy_cng_frame.data = runtime.dummy_data;
runtime.dummy_cng_frame.datalen= sizeof(runtime.dummy_data);
runtime.dummy_cng_frame.buflen= sizeof(runtime.dummy_data);
runtime.dummy_cng_frame.flags = SFF_CNG;
switch_set_flag((&runtime), SCF_NO_NEW_SESSIONS);
runtime.hard_log_level = SWITCH_LOG_DEBUG;
runtime.mailer_app = "sendmail";

View File

@ -462,6 +462,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
even_more_done:
if (!*frame) {
*frame = &runtime.dummy_cng_frame;
}
return status;
}