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 <kmoore@digium.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9421 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
Kinsey Moore 2010-09-29 22:00:22 +00:00 committed by Shaun Ruffell
parent b0185d1e84
commit 408787c77b
2 changed files with 7 additions and 7 deletions

View File

@ -7261,7 +7261,7 @@ static void process_echocan_events(struct dahdi_chan *chan)
{ {
union dahdi_echocan_events events = chan->ec_state->events; 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); dahdi_qevent_nolock(chan, DAHDI_EVENT_TX_CED_DETECTED);
if (chan->ec_state) { if (chan->ec_state) {
if (chan->ec_state->status.mode == ECHO_MODE_ACTIVE) if (chan->ec_state->status.mode == ECHO_MODE_ACTIVE)
@ -7271,7 +7271,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); dahdi_qevent_nolock(chan, DAHDI_EVENT_RX_CED_DETECTED);
if (chan->ec_state) { if (chan->ec_state) {
if (chan->ec_state->status.mode == ECHO_MODE_ACTIVE) if (chan->ec_state->status.mode == ECHO_MODE_ACTIVE)
@ -7281,18 +7281,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); 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); 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); dahdi_qevent_nolock(chan, DAHDI_EVENT_EC_NLP_DISABLED);
chan->ec_state->status.mode = ECHO_MODE_FAX; 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); dahdi_qevent_nolock(chan, DAHDI_EVENT_EC_NLP_ENABLED);
chan->ec_state->status.mode = ECHO_MODE_ACTIVE; chan->ec_state->status.mode = ECHO_MODE_ACTIVE;
} }

View File

@ -377,7 +377,7 @@ struct dahdi_echocan_state {
/*! The echocan enabled its NLP automatically. /*! The echocan enabled its NLP automatically.
*/ */
u32 NLP_auto_enabled:1; u32 NLP_auto_enabled:1;
}; } bit;
} events; } events;
}; };