From 4619398b4712062e65d1919156edea38785c590e Mon Sep 17 00:00:00 2001 From: mickeyl Date: Wed, 07 May 2003 13:44:23 +0000 Subject: fix bug kergoth introduced in rev 1.43 fd was an integer static to the function which means that the assignment only happens once. This is ok, when we don't close the device, but not if we close it after usage. Thanks to eilers for confirming! I wonder why noone else spotted this... --- diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 62e3569..7d862cd 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp @@ -1304,7 +1304,7 @@ typedef struct sharp_led_status { void Zaurus::buzzer ( int sound ) { - static int fd = ::open ( "/dev/sharp_buz", O_WRONLY|O_NONBLOCK ); + int fd = ::open ( "/dev/sharp_buz", O_WRONLY|O_NONBLOCK ); if ( fd >= 0 ) { ::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound ); -- cgit v0.9.0.2