mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-19 19:52:48 +00:00
Make ack_sleep do something
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1441 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -541,6 +541,7 @@ static int agent_ack_sleep( void *data )
|
|||||||
struct agent_pvt *p;
|
struct agent_pvt *p;
|
||||||
int res=0;
|
int res=0;
|
||||||
int to = 1000;
|
int to = 1000;
|
||||||
|
struct ast_frame *f;
|
||||||
|
|
||||||
/* Wait a second and look for something */
|
/* Wait a second and look for something */
|
||||||
|
|
||||||
@@ -556,6 +557,16 @@ static int agent_ack_sleep( void *data )
|
|||||||
res = 0;
|
res = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
f = ast_read(p->chan);
|
||||||
|
if (!f) {
|
||||||
|
res = -1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (f->frametype == AST_FRAME_DTMF)
|
||||||
|
res = f->subclass;
|
||||||
|
else
|
||||||
|
res = 0;
|
||||||
|
ast_frfree(f);
|
||||||
ast_mutex_lock(&p->lock);
|
ast_mutex_lock(&p->lock);
|
||||||
if (!p->app_sleep_cond) {
|
if (!p->app_sleep_cond) {
|
||||||
ast_mutex_unlock(&p->lock);
|
ast_mutex_unlock(&p->lock);
|
||||||
|
Reference in New Issue
Block a user