aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_dahdi.c
diff options
context:
space:
mode:
authorjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2010-04-30 22:36:49 +0000
committerjpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b>2010-04-30 22:36:49 +0000
commit762557326cdb010727aa5a61e440741c4c1ca275 (patch)
treecf16dd756f19b46b97cf4f967f3fe0254638baa9 /channels/chan_dahdi.c
parent57427ca327297e55aac3d5b595936d9a3bd108f6 (diff)
Merged revisions 260434 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r260434 | jpeeler | 2010-04-30 17:22:46 -0500 (Fri, 30 Apr 2010) | 11 lines Ensure channel state is not incorrectly set in the case of a very early answer. The needringing bit was being read in dahdi_read after answering thereby setting the state to ringing from up. This clears needringing upon answering so that is no longer possible. (closes issue #17067) Reported by: tzafrir Patches: needringing.diff uploaded by tzafrir (license 46) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@260437 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_dahdi.c')
-rw-r--r--channels/chan_dahdi.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 69dd562bb..931b8c6b8 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -2625,6 +2625,12 @@ static int my_off_hook(void *pvt)
return dahdi_set_hook(p->subs[SUB_REAL].dfd, DAHDI_OFFHOOK);
}
+static void my_set_needringing(void *pvt, int value)
+{
+ struct dahdi_pvt *p = pvt;
+ p->subs[SUB_REAL].needringing = value;
+}
+
static int my_start(void *pvt)
{
struct dahdi_pvt *p = pvt;
@@ -3129,6 +3135,7 @@ static struct analog_callback dahdi_analog_callbacks =
.confmute = my_confmute,
.set_pulsedial = my_set_pulsedial,
.get_orig_dialstring = my_get_orig_dialstring,
+ .set_needringing = my_set_needringing,
};
static struct dahdi_pvt *round_robin[32];
@@ -7599,6 +7606,7 @@ static struct ast_frame *dahdi_handle_event(struct ast_channel *ast)
p->subs[idx].f.frametype = AST_FRAME_CONTROL;
p->subs[idx].f.subclass.integer = AST_CONTROL_ANSWER;
/* Make sure it stops ringing */
+ p->subs[SUB_REAL].needringing = 0;
dahdi_set_hook(p->subs[idx].dfd, DAHDI_OFFHOOK);
ast_debug(1, "channel %d answered\n", p->channel);
if (p->cidspill) {