[Lcdproc] patch to fix backlight disable on HD44780 in lcdproc-0.5.2

Peter Marschall peter@adpm.de
Sat Mar 8 18:20:02 2008


Hi Will,

On Wednesday, 5. March 2008, Will Frazer wrote:
> Hi all,
> 	Spotted a bug in HD44780.c that caused a crash if no backlight support
> function was loaded (NULL pointer). Also noted that without this patch
> 'bachlight=no' doesn't work right (support function if present gets called
> irregardless of the setting in .conf file). Patch attached.
>
> New to this list & haven't seen this reported previously, so apologies if
> this is old news.

Thnks for sending the patch.

The critical part (NULL pointer) has been arelady included into the CVS 
version of LCDproc. 
You might try that one as it contains other fixes as well.

With regard to the "have_backlight == 0" case I am not 100% percent sure what 
to do:
- set backlight state to Off
- don't call the the ConnectionType's backlight function

For both alternatives I can find good arguments.

Do you experience problems if the function gets called despite have_backlight 
being 0 ?
Would the former altrnative above help as well ?

Regards
Peter

-- 
Peter Marschall
peter@adpm.de