提交 079975d3 authored 作者: Anthony Minessale's avatar Anthony Minessale

fix overlooked dtmf changed

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6992 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 0624a541
...@@ -55,7 +55,7 @@ struct soundtouch_helper { ...@@ -55,7 +55,7 @@ struct soundtouch_helper {
int literal; int literal;
}; };
static switch_status_t on_dtmf(switch_core_session_t *session, const char *dtmf) static switch_status_t on_dtmf(switch_core_session_t *session, const switch_dtmf_t *dtmf)
{ {
switch_media_bug_t *bug; switch_media_bug_t *bug;
...@@ -65,20 +65,13 @@ static switch_status_t on_dtmf(switch_core_session_t *session, const char *dtmf) ...@@ -65,20 +65,13 @@ static switch_status_t on_dtmf(switch_core_session_t *session, const char *dtmf)
struct soundtouch_helper *sth = (struct soundtouch_helper *) switch_core_media_bug_get_user_data(bug); struct soundtouch_helper *sth = (struct soundtouch_helper *) switch_core_media_bug_get_user_data(bug);
if (sth) { if (sth) {
const char *p;
if (sth->literal) { if (sth->literal) {
sth->literal = 0; sth->literal = 0;
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }
for (p = dtmf; p && *p; p++) {
if (sth->literal) {
sth->literal = 0;
return SWITCH_STATUS_SUCCESS;
}
switch(*p) { switch(dtmf->digit) {
case '*': case '*':
sth->literal++; sth->literal++;
break; break;
...@@ -146,7 +139,7 @@ static switch_status_t on_dtmf(switch_core_session_t *session, const char *dtmf) ...@@ -146,7 +139,7 @@ static switch_status_t on_dtmf(switch_core_session_t *session, const char *dtmf)
} }
} }
}
return SWITCH_STATUS_FALSE; return SWITCH_STATUS_FALSE;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论