From 102d7090380f5f3ecc6c250c47b08ad736e10653 Mon Sep 17 00:00:00 2001 From: Kinsey Moore Date: Fri, 21 Jan 2011 05:28:59 +0000 Subject: [PATCH] dahdi: Anonymous member in dahdi_echocan_events union. Make explicit what part of the union is being accessed. (closes issue #15908) Reported by: ys Patches: dahdi-dahdi_echocan_events.diff uploaded by ys (license 281) Signed-off-by: Kinsey Moore Signed-off-by: Shaun Ruffell Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=9421 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.4@9665 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/dahdi-base.c | 12 ++++++------ include/dahdi/kernel.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c index be4c089..3ecd5c8 100644 --- a/drivers/dahdi/dahdi-base.c +++ b/drivers/dahdi/dahdi-base.c @@ -7144,7 +7144,7 @@ static void process_echocan_events(struct dahdi_chan *chan) { union dahdi_echocan_events events = chan->ec_state->events; - if (events.CED_tx_detected) { + if (events.bit.CED_tx_detected) { dahdi_qevent_nolock(chan, DAHDI_EVENT_TX_CED_DETECTED); if (chan->ec_state) { if (chan->ec_state->status.mode == ECHO_MODE_ACTIVE) @@ -7154,7 +7154,7 @@ static void process_echocan_events(struct dahdi_chan *chan) } } - if (events.CED_rx_detected) { + if (events.bit.CED_rx_detected) { dahdi_qevent_nolock(chan, DAHDI_EVENT_RX_CED_DETECTED); if (chan->ec_state) { if (chan->ec_state->status.mode == ECHO_MODE_ACTIVE) @@ -7164,18 +7164,18 @@ static void process_echocan_events(struct dahdi_chan *chan) } } - if (events.CNG_tx_detected) + if (events.bit.CNG_tx_detected) dahdi_qevent_nolock(chan, DAHDI_EVENT_TX_CNG_DETECTED); - if (events.CNG_rx_detected) + if (events.bit.CNG_rx_detected) dahdi_qevent_nolock(chan, DAHDI_EVENT_RX_CNG_DETECTED); - if (events.NLP_auto_disabled) { + if (events.bit.NLP_auto_disabled) { dahdi_qevent_nolock(chan, DAHDI_EVENT_EC_NLP_DISABLED); chan->ec_state->status.mode = ECHO_MODE_FAX; } - if (events.NLP_auto_enabled) { + if (events.bit.NLP_auto_enabled) { dahdi_qevent_nolock(chan, DAHDI_EVENT_EC_NLP_ENABLED); chan->ec_state->status.mode = ECHO_MODE_ACTIVE; } diff --git a/include/dahdi/kernel.h b/include/dahdi/kernel.h index 83d3732..6df5294 100644 --- a/include/dahdi/kernel.h +++ b/include/dahdi/kernel.h @@ -375,7 +375,7 @@ struct dahdi_echocan_state { /*! The echocan enabled its NLP automatically. */ u32 NLP_auto_enabled:1; - }; + } bit; } events; };