mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-15 11:29:56 +00:00
update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1336 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
f0bb04453f
commit
de338c319d
@ -222,6 +222,8 @@ SWITCH_DECLARE(switch_status_t) switch_channel_queue_dtmf(switch_channel_t *chan
|
|||||||
{
|
{
|
||||||
switch_status_t status;
|
switch_status_t status;
|
||||||
register switch_size_t len, inuse;
|
register switch_size_t len, inuse;
|
||||||
|
switch_size_t wr = 0;
|
||||||
|
char *p;
|
||||||
|
|
||||||
assert(channel != NULL);
|
assert(channel != NULL);
|
||||||
|
|
||||||
@ -234,7 +236,16 @@ SWITCH_DECLARE(switch_status_t) switch_channel_queue_dtmf(switch_channel_t *chan
|
|||||||
switch_buffer_toss(channel->dtmf_buffer, strlen(dtmf));
|
switch_buffer_toss(channel->dtmf_buffer, strlen(dtmf));
|
||||||
}
|
}
|
||||||
|
|
||||||
status = switch_buffer_write(channel->dtmf_buffer, dtmf, len) ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_MEMERR;
|
p = dtmf;
|
||||||
|
while(wr < len && p) {
|
||||||
|
if (*p > 47 && *p < 58) {
|
||||||
|
wr++;
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
status = switch_buffer_write(channel->dtmf_buffer, dtmf, wr) ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_MEMERR;
|
||||||
switch_mutex_unlock(channel->dtmf_mutex);
|
switch_mutex_unlock(channel->dtmf_mutex);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user