diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-02 01:44:50 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-02 01:44:50 +0000 |
commit | 32be9cccdf62ac1ff88f16576b604b0629a32c49 (patch) | |
tree | 4ef906153e251082133d1e379dba2929e6c2ab50 /channels/chan_skinny.c | |
parent | 1b95fc2c1e4190c765c6a27ef962e67660bd7786 (diff) |
It was pointed out to me, that using two frames is silly.
Thanks Josh.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41790 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_skinny.c')
-rw-r--r-- | channels/chan_skinny.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index 5011fdb39..80f60dbaf 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -2760,16 +2760,12 @@ static int handle_keypad_button_message(skinny_req *req, struct skinnysession *s struct skinny_subchannel *sub = NULL; struct skinny_line *l; struct skinny_device *d = s->device; - struct ast_frame fb = { 0, }; - struct ast_frame fe = { 0, }; + struct ast_frame f = { 0, }; char dgt; int digit; int lineInstance; int callReference; - fb.frametype = AST_FRAME_DTMF_BEGIN; - fe.frametype = AST_FRAME_DTMF_END; - digit = letohl(req->data.keypad.button); lineInstance = letohl(req->data.keypad.lineInstance); callReference = letohl(req->data.keypad.callReference); @@ -2792,11 +2788,9 @@ static int handle_keypad_button_message(skinny_req *req, struct skinnysession *s ast_log(LOG_WARNING, "Unsupported digit %d\n", digit); } - fb.subclass = dgt; - fe.subclass = dgt; + f.subclass = dgt; - fb.src = "skinny"; - fe.src = "skinny"; + f.src = "skinny"; if (lineInstance && callReference) sub = find_subchannel_by_instance_reference(d, lineInstance, callReference); @@ -2809,16 +2803,20 @@ static int handle_keypad_button_message(skinny_req *req, struct skinnysession *s l = sub->parent; if (sub->owner) { if (sub->owner->_state == 0) { - ast_queue_frame(sub->owner, &fb); + f.frametype = AST_FRAME_DTMF_BEGIN; + ast_queue_frame(sub->owner, &f); } /* XXX MUST queue this frame to all lines in threeway call if threeway call is active */ - ast_queue_frame(sub->owner, &fe); + f.frametype = AST_FRAME_DTMF_END; + ast_queue_frame(sub->owner, &f); /* XXX This seriously needs to be fixed */ if (sub->next && sub->next->owner) { if (sub->owner->_state == 0) { - ast_queue_frame(sub->next->owner, &fb); + f.frametype = AST_FRAME_DTMF_BEGIN; + ast_queue_frame(sub->next->owner, &f); } - ast_queue_frame(sub->next->owner, &fe); + f.frametype = AST_FRAME_DTMF_END; + ast_queue_frame(sub->next->owner, &f); } } else { if (skinnydebug) |