wctdm24xxp: Reset the polarity debounce setting when battery is lost.

Wait until we have de-bounced the presence of battery before moving on the
check for changes in polarity. This removes the sometimes random
polarity messages generated on an FXO port when the far side drops
battery from a supervisor disconnect.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@10161 a0bf4364-ded3-4de4-8d8a-66a801d63aff
This commit is contained in:
Shaun Ruffell 2011-08-30 16:38:01 +00:00
parent 1d03f6f8a8
commit 3d8629e864

View File

@ -1965,6 +1965,9 @@ wctdm_voicedaa_check_hook(struct wctdm *wc, struct wctdm_module *const mod)
battery present or unknown, debounce timer (going to battery lost)
*/
fxo->lastpol = fxo->polarity;
fxo->polaritydebounce = 0;
if (fxo->battery == BATTERY_LOST) {
if (fxo->battdebounce) {
/* we were going to BATTERY_PRESENT, but battery was lost again,