Mistake in hal-polling module

Bug #404170 reported by yoho
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Laptop Mode Tools
Invalid
Undecided
Ritesh Raj Sarraf

Bug Description

You can read in hal-polling module the following code :

# Some backward compatibility for version 1.42
if [ x$BATT_ENABLE_HAL_POLLING = x1 ] ; then
      BATT_DISABLE_HAL_POLLING=0
else
      BATT_DISABLE_HAL_POLLING=1
fi
if [ x$AC_ENABLE_HAL_POLLING = x1 ] ; then
      AC_DISABLE_HAL_POLLING=0
else
      AC_DISABLE_HAL_POLLING=1
fi

The problem is that it does not do what's in the comment : it
overrides completely the preferences set in the config file. This code
purely sets BATT_DISABLE_HAL_POLLING to 0 or 1 whatever is set for the
value of this variable in the config file.

The code should be changed to something like this :

# Some backward compatibility for version 1.42
if [ ! x$BATT_ENABLE_HAL_POLLING = x ] ; then
 if [ x$BATT_ENABLE_HAL_POLLING = x1 ] ; then
      BATT_DISABLE_HAL_POLLING=0
 else
      BATT_DISABLE_HAL_POLLING=1
 fi
fi
if [ ! x$AC_ENABLE_HAL_POLLING = x ] ; then
 if [ x$AC_ENABLE_HAL_POLLING = x1 ] ; then
        AC_DISABLE_HAL_POLLING=0
 else
        AC_DISABLE_HAL_POLLING=1
 fi
fi

Revision history for this message
Ritesh Raj Sarraf (rrs) wrote :

What version of laptop-mode-tools are you using ?

This was fixed some time ago already.

Changed in laptop-mode-tools:
status: New → Won't Fix
status: Won't Fix → Incomplete
Revision history for this message
yoho (a-launchpad-vpanel-cjb-net) wrote :

Well, isn't 1.47 the latest version ?

Revision history for this message
yoho (a-launchpad-vpanel-cjb-net) wrote :
Revision history for this message
Ritesh Raj Sarraf (rrs) wrote :

Since this was fixed already, I'm closing it. If you are still seeing this issue with the latest version please re-open.

Changed in laptop-mode-tools:
status: Incomplete → Invalid
assignee: nobody → Ritesh Raj Sarraf (rickysarraf)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.